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 \t0%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 00 Barbara Feldon 00 Burt Mustin 00 Dave Ketchum 011 Victor French 036 Angelique Pettyjohn 03 Sean Connery 07
Output for 5.4.0 - 5.4.14
Parse error: syntax error, unexpected 'list' (T_LIST) in /in/tAi7P on line 15
Process exited with code 255.
Output for 5.3.0 - 5.3.24
Parse error: syntax error, unexpected T_LIST in /in/tAi7P on line 15
Process exited with code 255.

preferences:
174.52 ms | 1399 KiB | 75 Q