3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Hollywood's secret agents and the actors who portrayed them: $agents = array( array(086, "Don Adams"), array(099, "Barbara Feldon"), array(008, "Burt Mustin"), array(013, "Dave Ketchum"), array(044, "Victor French"), array(038, "Angelique Pettyjohn"), array(007, "Sean Connery") ); echo "The secret agents and the actors who portrayed them:\n"; foreach ($agents as list( $agent,$actor ) ) { printf("%s \t00%d\n",$actor,$agent); }
Output for 5.5.24 - 5.5.35, 5.6.7 - 5.6.28
The secret agents and the actors who portrayed them: Don Adams 000 Barbara Feldon 000 Burt Mustin 000 Dave Ketchum 0011 Victor French 0036 Angelique Pettyjohn 003 Sean Connery 007
Output for 5.4.0 - 5.4.12, 5.4.14
Parse error: syntax error, unexpected 'list' (T_LIST) in VWnJ6 on line 15
Process exited with code 255.
Output for 5.4.13
Parse error: syntax error, unexpected 'list' (T_LIST) in /in/Yol5W on line 15
Process exited with code 255.
Output for 5.3.0 - 5.3.22, 5.3.24
Parse error: syntax error, unexpected T_LIST in VWnJ6 on line 15
Process exited with code 255.
Output for 5.3.23
Parse error: syntax error, unexpected T_LIST in /in/Yol5W on line 15
Process exited with code 255.

preferences:
203.81 ms | 1395 KiB | 75 Q