3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $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 INMdu
Output for 7.1.0
10.947.424 12.587.008 348.976 8.388.608
Output for 7.0.0 - 7.0.14
10.947.440 12.587.008 348.992 8.388.608
Output for hhvm-3.12.0
8.388.608 8.801.728 8.388.608 304.576
Output for hhvm-3.10.0
8.388.608 8.800.088 8.388.608 302.936
Output for 5.6.0 - 5.6.25
20.468.728 20.971.520 219.904 786.432
Output for 5.5.0 - 5.5.38
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 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/gHNGp on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[' in /in/gHNGp on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/gHNGp on line 3
Process exited with code 255.