3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array(); for($i = 0; $i < 50000; $i++) { $array[] = md5('Hallo'); } var_dump(number_format(memory_get_usage(), 0, ',', '.')) . "\n"; var_dump(number_format(memory_get_usage(true), 0,',','.')) . "\n"; unset($array); var_dump(number_format(memory_get_usage(), 0, ',', '.')) . "\n"; var_dump(number_format(memory_get_usage(true), 0,',','.')) . "\n";
Output for 7.1.0
string(9) "5.650.784" string(9) "6.295.552" string(7) "349.488" string(9) "4.194.304"
Output for 7.0.0 - 7.0.14
string(9) "5.650.800" string(9) "6.295.552" string(7) "349.504" string(9) "4.194.304"
Output for 5.6.7 - 5.6.28
string(10) "10.344.832" string(10) "10.747.904" string(7) "220.288" string(7) "786.432"
Output for 5.5.24 - 5.5.35
string(10) "10.344.832" string(10) "10.747.904" string(7) "220.272" string(7) "786.432"
Output for 5.4.10 - 5.4.45
string(10) "10.345.368" string(10) "10.747.904" string(7) "220.792" string(7) "786.432"
Output for 5.4.0 - 5.4.9
string(10) "10.344.832" string(10) "10.747.904" string(7) "220.264" string(7) "786.432"
Output for 5.3.11 - 5.3.29
string(10) "10.750.496" string(10) "11.272.192" string(7) "625.968" string(9) "1.310.720"
Output for 5.3.0 - 5.3.10
string(10) "10.750.248" string(10) "11.272.192" string(7) "625.664" string(9) "1.310.720"
Output for 5.2.10 - 5.2.17
string(9) "9.808.416" string(10) "10.223.616" string(6) "83.632" string(7) "786.432"
Output for 5.2.7 - 5.2.9
string(9) "9.809.992" string(10) "10.223.616" string(7) "214.776" string(7) "786.432"
Output for 5.2.6
string(9) "9.810.296" string(10) "10.223.616" string(7) "215.096" string(7) "786.432"
Output for 5.2.3 - 5.2.5
string(9) "9.810.280" string(9) "9.961.472" string(7) "215.096" string(9) "1.048.576"
Output for 5.2.2
string(9) "9.808.208" string(9) "9.961.472" string(7) "212.992" string(7) "786.432"
Output for 5.2.1
string(9) "9.807.648" string(9) "9.961.472" string(7) "114.704" string(9) "1.835.008"
Output for 5.0.0 - 5.2.0
Fatal error: Call to undefined function memory_get_usage() in /in/EqVLj on line 8
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: memory_get_usage() in /in/EqVLj on line 8
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: memory_get_usage() in /in/EqVLj on line 8
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: memory_get_usage() in /in/EqVLj on line 8