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" ) ); $count = array(); foreach($arrays as $simple) { $count[$simple['location']]++; }
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
Notice: Undefined index: Breakwater in /in/CFKdv on line 25 Notice: Undefined index: Whateverelse in /in/CFKdv on line 25
Output for hhvm-3.10.0 - 3.12.0
Output for 4.3.0 - 5.2.17
Notice: Undefined index: Breakwater in /in/CFKdv on line 25 Notice: Undefined index: Whateverelse in /in/CFKdv on line 25