3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = array(); for($i = 0; $i < 50000; $i++) { $array[] = md5('hallo'); $array[] = md5('bla'); } echo number_format(memory_get_usage(), 0, ',', '.'); echo "\n"; echo number_format(memory_get_usage(true), 0, ',', '.'); echo "\n"; unset($array); echo number_format(memory_get_usage(), 0, ',', '.'); echo "\n"; echo number_format(memory_get_usage(true), 0, ',', '.');
based on gHNGp
Output for 7.2.0
10.983.968 12.587.008 385.520 8.388.608
Output for 7.1.0, 7.1.7
10.947.424 12.587.008 348.976 8.388.608
Output for 7.1.5 - 7.1.6
10.948.096 12.587.008 349.648 8.388.608
Output for 7.0.0 - 7.0.20
10.947.440 12.587.008 348.992 8.388.608
Output for 5.6.7 - 5.6.28
20.468.728 20.971.520 219.904 786.432
Output for 5.5.24 - 5.5.35
20.468.728 20.971.520 219.888 786.432
Output for 5.4.10 - 5.4.45
20.469.248 20.971.520 220.408 786.432
Output for 5.4.0 - 5.4.9
20.468.744 20.971.520 219.880 786.432
Output for 5.3.11 - 5.3.29
20.874.152 21.233.664 625.272 1.310.720
Output for 5.3.0 - 5.3.10
20.873.824 21.233.664 624.968 1.310.720
Output for 5.2.10 - 5.2.17
19.532.128 19.922.944 82.936 786.432
Output for 5.2.7 - 5.2.9
19.533.712 19.922.944 214.088 786.432
Output for 5.2.6
19.534.048 19.922.944 214.408 786.432
Output for 5.2.3 - 5.2.5
19.534.080 19.660.800 214.408 786.432
Output for 5.2.2
19.531.944 19.660.800 212.296 786.432
Output for 5.2.1
19.531.360 19.660.800 114.008 1.572.864
Output for 5.0.0 - 5.2.0
Fatal error: Call to undefined function memory_get_usage() in /in/YIQJf on line 9
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: memory_get_usage() in /in/YIQJf on line 9
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: memory_get_usage() in /in/YIQJf on line 9
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: memory_get_usage() in /in/YIQJf on line 9