Base64Event.php 357 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace StephenHill\Benchmarks;
  3. use Athletic\AthleticEvent;
  4. class Base64Event extends AthleticEvent
  5. {
  6. /**
  7. * @iterations 10000
  8. */
  9. public function encodeBase64()
  10. {
  11. base64_encode('Hello World');
  12. }
  13. /**
  14. * @iterations 10000
  15. */
  16. public function decodeBase64()
  17. {
  18. base64_decode('SGVsbG8gV29ybGQ=');
  19. }
  20. }