3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Create a simple array. $array = array(1, 2, 3, 4, 5); //print_r($array); // Now delete every item, but leave the array itself intact: foreach ($array as $i => $value) { echo $array[$i]; } print_r($array); ?>

preferences:
59.05 ms | 402 KiB | 5 Q