3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo memory_get_peak_usage(), PHP_EOL; $a = range(1, 10000); $a[-1] = 0; echo memory_get_peak_usage(), PHP_EOL; // 380824 // 874320
based on URKoF
Output for 7.2.0 - 7.2.12
418000 1501352
Output for 7.0.0 - 7.1.24
381296 1464680
Output for hhvm-3.10.1 - 3.22.0
2097152 2097152
Output for 5.6.0 - 5.6.38
220544 1709848
Output for 5.5.0 - 5.5.38
220544 1709800
Output for 5.4.11 - 5.4.45
220664 1710480
Output for 5.3.21 - 5.3.29
627040 2112904