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
418040 1501392
Output for 7.0.0 - 7.1.0, 7.1.7 - 7.1.10
381368 1464752
Output for 7.1.5 - 7.1.6
381368 1464912
Output for 5.6.8 - 5.6.28
220728 1710032
Output for 5.5.24 - 5.5.35
220728 1709984
Output for 5.4.11 - 5.4.45
220664 1710480
Output for 5.3.21 - 5.3.29
627040 2112904