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 \t%d\n",$actor,$agent); }
Output for 5.5.24 - 5.6.28, hhvm-3.10.0 - 3.12.0
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.14
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.24
Parse error: syntax error, unexpected T_LIST in /in/4KUhV on line 15
Process exited with code 255.