3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = new SplFixedArray(1024 * 1024); // array(); for ($i = 0; $i < 1024 * 1024; ++$i) $array[$i] = 0; echo memory_get_peak_usage();
Output for 7.2.0
17160608
Output for 7.1.10

Process exited with code 137.
Output for 7.1.0, 7.1.7
17123968
Output for 7.1.5 - 7.1.6
17124096
Output for 7.0.0 - 7.0.20
17124000
Output for 5.5.0 - 5.6.25
58938512