3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr = array(); for ($i = 0; $i < 100000; $i++) { $arr[] = array("foo" => $i, "bar" => $i); } print(memory_get_peak_usage() . "\r\n"); $arr_chunked = array_chunk($arr, 100); print(memory_get_peak_usage() . "\r\n");
Output for 7.2.0
42182440 50467392
Output for 7.0.0 - 7.1.0, 7.1.7 - 7.1.10
42145768 50430720
Output for 7.1.5 - 7.1.6
42145936 50430888
Output for 5.6.8 - 5.6.28
54069112 64142008
Output for 5.5.24 - 5.5.35
54069112 64141960
Output for 5.4.10 - 5.4.45
54069072 64141920
Output for 5.3.20 - 5.3.29
56072960 66145928