3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = range(1000, 9999); shuffle($a); printf("%.2F MB\n%.2F MB\n", memory_get_usage() / 1024 / 1024, memory_get_peak_usage() / 1024 / 1024);
Output for 7.0.0 - 7.1.0
0.83 MB 0.83 MB
Output for 5.4.0 - 5.6.28
1.50 MB 1.57 MB
Output for 5.3.0 - 5.3.29
1.88 MB 1.95 MB
Output for 5.2.1 - 5.2.17
1.30 MB 1.37 MB
Output for 5.0.0 - 5.2.0
Fatal error: Call to undefined function memory_get_usage() in /in/jsso4 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/jsso4 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/jsso4 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/jsso4 on line 4