3v4l.org

run code in 300+ PHP versions simultaneously
<?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, ',', '.');
Output for 7.3.0 - 7.3.12
10.987.624 12.587.008 389.176 8.388.608
Output for 7.2.0 - 7.2.24
10.983.928 12.587.008 385.480 8.388.608
Output for 7.1.25 - 7.1.33
10.947.352 12.587.008 348.904 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.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.1.6, 5.2.0 - 5.2.17, 5.3.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.3.11, 4.4.0 - 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.

preferences:
196.97 ms | 401 KiB | 261 Q