3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(memory_get_peak_usage(true)); $a = range(1, 100000); var_dump(memory_get_peak_usage(true)); $a[0] = 1; var_dump(memory_get_peak_usage(true));
based on MJHCP
Output for 7.0.0 - 7.3.0alpha1
int(2097152) int(6295552) int(6295552)
Output for 5.4.12 - 5.6.28
int(262144) int(15204352) int(15204352)
Output for 5.3.22 - 5.3.29
int(786432) int(15728640) int(15728640)