3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fav = array("Zahid", "adnan") ; sort($fav); foreach ($fav as $fav){ echo "my favoriate"."<br>" echo $fav."<br>"; } ?>
Output for 8.1.0 - 8.1.29, 8.2.0 - 8.2.21, 8.3.0 - 8.3.9
Parse error: syntax error, unexpected token "echo", expecting "," or ";" in /in/X51DJ on line 6
Process exited with code 255.

preferences:
156.67 ms | 1424 KiB | 7 Q