3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fruitBasket = [ '0' => "apple", '1' => "banana", '2' => "cherimoya", '3' => "eggfruit", '4' => "fig", '5' => "grapefruit", '6' => "honeydew", '7' => "ice plant", ]; for($i=0; $i < 10; $i++) { echo "Iteration: " . $i . "\n"; foreach($fruitBasket as $k => $v) { echo sprintf("[%s] - %s \n", k, v); } echo "Iteration: " . $i . "\n"; }

preferences:
51.85 ms | 402 KiB | 5 Q