3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $arrays = array ( 0 => array( "location" => "Breakwater", "bsid" => "105c" ), 1 => array( "location" => "Breakwater", "bsid" => "105c" ), 2 => array( "location" => "Breakwater", "bsid" => "105c" ), 3 => array( "location" => "Whateverelse", "bsid" => "105c" ) ); foreach ($array as $type) { $count+= count($type); } var_dump($count);
Output for 5.1.0 - 5.6.28, 7.0.0 - 7.1.0
Notice: Undefined variable: array in /in/8fEHo on line 22 Warning: Invalid argument supplied for foreach() in /in/8fEHo on line 22 Notice: Undefined variable: count in /in/8fEHo on line 25 NULL
Output for hhvm-3.10.0 - 3.12.0
Notice: Undefined variable: array in /in/8fEHo on line 24 Warning: Invalid argument supplied for foreach() in /in/8fEHo on line 24 Notice: Undefined variable: count in /in/8fEHo on line 25 NULL
Output for 5.0.4 - 5.0.5
Warning: Invalid argument supplied for foreach() in /in/8fEHo on line 22 Notice: Undefined variable: count in /in/8fEHo on line 25 NULL
Output for 4.3.0 - 4.3.10, 4.4.0 - 5.0.3
Warning: Invalid argument supplied for foreach() in /in/8fEHo on line 22 Notice: Undefined variable: count in /in/8fEHo on line 25 NULL
Output for 4.3.11
Notice: Undefined variable: count in /in/8fEHo on line 25 NULL