3v4l.org

run code in 300+ PHP versions simultaneously
<?php function ct($array) { var_dump('1'); return count($array); } $ar = [1,2,3,4,5,6]; for ($counter = 0, $length = ct($ar); $counter < $length; $counter++) var_dump('loop'); }
based on 4mBt2
Output for 8.0.0alpha1
Parse error: Unmatched '}' in /in/r3ane on line 13
Process exited with code 255.
Output for 7.2.0 - 7.2.31, 7.3.0 - 7.3.19, 7.4.0 - 7.4.7
Parse error: syntax error, unexpected '}', expecting end of file in /in/r3ane on line 13
Process exited with code 255.