3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // Get Smart - TV comedy debuted 1965 $agents = array( array("86" => "Don Adams"), array("99" => "Barbara Feldon"), array("08" => "Burt Mustin"), array("13" => "Dave Ketchum"), array("44" => "Victor French"), array("38" => "Angelique Pettyjohn") ); echo "The secret agents and the actors who portrayed them:\n"; foreach ($agents as list( $agent,$actor ) ) { echo $actor, ' => ', $agent; }
Output for 7.0.0 - 7.1.0
The secret agents and the actors who portrayed them: Notice: Undefined offset: 0 in /in/qgp9g on line 14 Notice: Undefined offset: 1 in /in/qgp9g on line 14 => Notice: Undefined offset: 0 in /in/qgp9g on line 14 Notice: Undefined offset: 1 in /in/qgp9g on line 14 => Notice: Undefined offset: 0 in /in/qgp9g on line 14 Notice: Undefined offset: 1 in /in/qgp9g on line 14 => Notice: Undefined offset: 0 in /in/qgp9g on line 14 Notice: Undefined offset: 1 in /in/qgp9g on line 14 => Notice: Undefined offset: 0 in /in/qgp9g on line 14 Notice: Undefined offset: 1 in /in/qgp9g on line 14 => Notice: Undefined offset: 0 in /in/qgp9g on line 14 Notice: Undefined offset: 1 in /in/qgp9g on line 14 =>
Output for hhvm-3.10.0 - 3.12.0
The secret agents and the actors who portrayed them: Notice: Undefined index: 1 in /in/qgp9g on line 18 Notice: Undefined index: 0 in /in/qgp9g on line 18 => Notice: Undefined index: 1 in /in/qgp9g on line 18 Notice: Undefined index: 0 in /in/qgp9g on line 18 => Notice: Undefined index: 1 in /in/qgp9g on line 18 Notice: Undefined index: 0 in /in/qgp9g on line 18 => Notice: Undefined index: 1 in /in/qgp9g on line 18 Notice: Undefined index: 0 in /in/qgp9g on line 18 => Notice: Undefined index: 1 in /in/qgp9g on line 18 Notice: Undefined index: 0 in /in/qgp9g on line 18 => Notice: Undefined index: 1 in /in/qgp9g on line 18 Notice: Undefined index: 0 in /in/qgp9g on line 18 =>
Output for 5.5.24 - 5.6.28
The secret agents and the actors who portrayed them: Notice: Undefined offset: 1 in /in/qgp9g on line 14 Notice: Undefined offset: 0 in /in/qgp9g on line 14 => Notice: Undefined offset: 1 in /in/qgp9g on line 14 Notice: Undefined offset: 0 in /in/qgp9g on line 14 => Notice: Undefined offset: 1 in /in/qgp9g on line 14 Notice: Undefined offset: 0 in /in/qgp9g on line 14 => Notice: Undefined offset: 1 in /in/qgp9g on line 14 Notice: Undefined offset: 0 in /in/qgp9g on line 14 => Notice: Undefined offset: 1 in /in/qgp9g on line 14 Notice: Undefined offset: 0 in /in/qgp9g on line 14 => Notice: Undefined offset: 1 in /in/qgp9g on line 14 Notice: Undefined offset: 0 in /in/qgp9g on line 14 =>
Output for 5.4.0 - 5.4.45
Parse error: syntax error, unexpected 'list' (T_LIST) in /in/qgp9g on line 14
Process exited with code 255.
Output for 5.3.0 - 5.3.29
Parse error: syntax error, unexpected T_LIST in /in/qgp9g on line 14
Process exited with code 255.
Output for 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_LIST, expecting '&' or T_STRING or T_VARIABLE or '$' in /in/qgp9g on line 14
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/qgp9g on line 14
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/qgp9g on line 14
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_LIST, expecting T_VARIABLE or '$' in /in/qgp9g on line 14
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /in/qgp9g on line 14
Process exited with code 255.