3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $s = ''; for ($i = 0; $i < 10000000; ++$i) { // 10 MB $s .= rand(0, 9); } $s .= $s . $s . $s . $s . $s . $s . $s . $s . $s; // 100Mb echo "data: " . mb_strlen($s) / (1024 * 1024) . " Mb"; $start = microtime(true); for ($i = 0; $i < 1000; ++$i) { mb_strlen($s); } $end = microtime(true); echo "result = " . ($end - $start);
Output for 5.3.7 - 5.3.8, 5.3.10 - 5.3.15, 5.3.17 - 5.4.30
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 40000001 bytes) in /in/aYusk on line 10
Process exited with code 255.
Output for 5.3.9, 5.3.16

Process exited with code 137.