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, ',', '.'); unset($array); echo number_format(memory_get_usage(), 0, ',', '.'); echo "\n"; echo number_format(memory_get_usage(true), 0, ',', '.');
based on 5VubN
Output for 7.1.0
10.947.296 12.587.008348.848 8.388.608
Output for 7.0.0 - 7.0.14
10.947.312 12.587.008348.864 8.388.608
Output for hhvm-3.12.0
8.388.608 8.802.1128.388.608 304.960
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.6.7 - 5.6.28
20.468.640 20.971.520219.816 786.432
Output for 5.5.24 - 5.5.35
20.468.640 20.971.520219.800 786.432
Output for 5.4.10 - 5.4.45
20.469.184 20.971.520220.320 786.432
Output for 5.4.0 - 5.4.9
20.468.648 20.971.520219.792 786.432
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/INMdu 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/INMdu on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/INMdu on line 3
Process exited with code 255.