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:"; list( $agent,$actor ) = $agents; foreach ($agents as $agents) { echo $actor, ' => ', $agent; }
Output for 5.4.0 - 5.6.28, hhvm-3.10.0 - 3.12.0
The secret agents and the actors who portrayed them: Notice: Array to string conversion in /in/hPRRF on line 17 Array => Notice: Array to string conversion in /in/hPRRF on line 17 Array Notice: Array to string conversion in /in/hPRRF on line 17 Array => Notice: Array to string conversion in /in/hPRRF on line 17 Array Notice: Array to string conversion in /in/hPRRF on line 17 Array => Notice: Array to string conversion in /in/hPRRF on line 17 Array Notice: Array to string conversion in /in/hPRRF on line 17 Array => Notice: Array to string conversion in /in/hPRRF on line 17 Array Notice: Array to string conversion in /in/hPRRF on line 17 Array => Notice: Array to string conversion in /in/hPRRF on line 17 Array Notice: Array to string conversion in /in/hPRRF on line 17 Array => Notice: Array to string conversion in /in/hPRRF on line 17 Array
Output for 4.3.0 - 5.3.29
The secret agents and the actors who portrayed them:Array => ArrayArray => ArrayArray => ArrayArray => ArrayArray => ArrayArray => Array