3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $time = microtime(true); $memo = memory_get_usage(true); // BEGIN $x = str_repeat('0', 1024*1024); $y = $x; // END $memo = memory_get_usage(true) - $memo; $time = microtime(true) - $time; echo sprintf("%dms - %.2fmo", $time*1000, $memo/1024/1024);
Output for 7.0.0 - 7.1.0
0ms - 0.00mo
Output for 5.2.1 - 5.3.27, 5.3.29 - 5.4.2, 5.4.4 - 5.6.28, hhvm-3.10.0 - 3.12.0
0ms - 1.25mo
Output for 5.4.3
14ms - 1.25mo
Output for 5.3.28
7ms - 1.25mo
Output for 5.0.0 - 5.2.0
Fatal error: Call to undefined function memory_get_usage() in /in/IE43t on line 4
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: memory_get_usage() in /in/IE43t on line 4
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: memory_get_usage() in /in/IE43t on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: memory_get_usage() in /in/IE43t on line 4