3v4l.org

run code in 300+ 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:
35.06 ms | 404 KiB | 5 Q