3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array_fill(0, 100000, true); printf("%.2f mb\n", memory_get_peak_usage() / 1024 / 1024); foreach ($arr as $value) { break; } printf("%.2f mb\n", memory_get_peak_usage() / 1024 / 1024); foreach (array_keys($arr) as $value) { break; } printf("%.2f mb\n", memory_get_peak_usage() / 1024 / 1024);

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
169.01 ms | 2114 KiB | 12 Q