3v4l.org

run code in 500+ PHP versions simultaneously
<?php $limit = 4; $selections = ['a', 'b', 'c', 'd', 'e']; shuffle($selections); foreach ($selections as $i => $selection) { echo "before include $selection\n"; // start include code... if ($i < $limit) { echo "**display limited $selection**\n"; } // end include code echo "after include $selection\n"; echo "---\n"; }

preferences:
21.67 ms | 476 KiB | 4 Q