3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cars=array("Dodge"=>array("Avenger","Challenger","Charger","Dart"),"Toyota"=>array("Highlander","Tundra","Corolla"),"Nissan"=>array("Sentra","Altima","Maxima")); echo "Make: Toyota"; echo "<br><br>"; $first = TRUE; $cars = ''; foreach($cars['Toyota'] as $x){ if ($first){ $cars .= $x; }else{ $cars = ", $x"; } echo $cars; ?>
Output for 5.4.0 - 5.4.19, 5.5.0 - 5.5.3
Parse error: syntax error, unexpected end of file in /in/ElU4I on line 16
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected $end in /in/ElU4I on line 16
Process exited with code 255.

preferences:
186.54 ms | 1386 KiB | 59 Q