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 \t%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 0 Barbara Feldon 0 Burt Mustin 0 Dave Ketchum 11 Victor French 36 Angelique Pettyjohn 3 Sean Connery 7
Output for 5.4.0 - 5.4.12, 5.4.14
Parse error: syntax error, unexpected 'list' (T_LIST) in oQjQe on line 15
Process exited with code 255.
Output for 5.4.13
Parse error: syntax error, unexpected 'list' (T_LIST) in /in/4KUhV 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 oQjQe on line 15
Process exited with code 255.
Output for 5.3.23
Parse error: syntax error, unexpected T_LIST in /in/4KUhV on line 15
Process exited with code 255.

preferences:
199.63 ms | 1386 KiB | 75 Q