3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $value = base64_encode(md5('')); $start = microtime(true); for ($i = 0; $i < 100; ++$i) { $result = []; do { $result[] = $value; $value = substr($value, 0, -1); } while ('' !== $value); $result = array_reverse($result); } $end = microtime(true); echo $i/($end - $start), ' op/s', PHP_EOL; var_dump($result);
Output for 7.0.0 - 7.1.0
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 67108872 bytes) in /in/NkXgP on line 8
Process exited with code 255.
Output for 5.4.0 - 5.6.28
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 32 bytes) in /in/NkXgP on line 9
Process exited with code 255.
Output for 5.3.7 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/NkXgP on line 6
Process exited with code 255.