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 ) ) { echo $actor, ' => ', $agent, "\n"; }
Output for 5.5.0 - 5.5.36, 5.6.0 - 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.14
Parse error: syntax error, unexpected 'list' (T_LIST) in /in/9chIf 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/9chIf on line 15
Process exited with code 255.
Output for 5.1.0 - 5.1.6, 5.2.0 - 5.2.17
Parse error: syntax error, unexpected T_LIST, expecting '&' or T_STRING or T_VARIABLE or '$' in /in/9chIf on line 15
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_LIST, expecting '&' or T_STRING or T_VARIABLE or '$' in /in/9chIf on line 15
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_LIST, expecting T_VARIABLE or '$' in /in/9chIf on line 15
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1
Parse error: parse error, unexpected T_LIST, expecting T_VARIABLE or '$' in /in/9chIf on line 15
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /in/9chIf on line 15
Process exited with code 255.

preferences:
232.64 ms | 1395 KiB | 160 Q