3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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.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.14
Parse error: syntax error, unexpected 'list' (T_LIST) in /in/VWnJ6 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/VWnJ6 on line 15
Process exited with code 255.