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($i = 0; $c = ct($ar); $i < $c; $i++) { var_dump('loop'); }
Output for 7.2.0 - 7.2.31, 7.3.0 - 7.3.19, 7.4.0 - 7.4.7, 8.0.0alpha1
Parse error: syntax error, unexpected ';', expecting ')' in /in/4mBt2 on line 11
Process exited with code 255.