3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arrays = [ ['a', 'c', 'b'], ['f', 'd'], [] ]; foreach ($arrays as &$array) { } foreach ($arrays as $array) { print_r($array); }
Output for 7.3.0 - 7.3.26, 7.4.0 - 7.4.14, 8.0.0 - 8.0.1
Array ( [0] => a [1] => c [2] => b ) Array ( [0] => f [1] => d ) Array ( [0] => f [1] => d )