Base16Event.php 354 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace StephenHill\Benchmarks;
  3. use Athletic\AthleticEvent;
  4. class Base16Event extends AthleticEvent
  5. {
  6. /**
  7. * @iterations 10000
  8. */
  9. public function encodeBase16()
  10. {
  11. bin2hex('Hello World');
  12. }
  13. /**
  14. * @iterations 10000
  15. */
  16. public function decodeBase16()
  17. {
  18. pack('H*', '48656c6c6f20576f726c64');
  19. }
  20. }