3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $productos = array( array("id" => 10, "name"=>"bread"), array("id" => 12, "name"=>"Jam"), array("id" => 10, "name"=>"bread"), array("id" => 105, "name"=>"lobster") ); $cuenta = array(); foreach($productos as $producto){ $cuenta[$producto['id']]++; }
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
Notice: Undefined offset: 10 in /in/Arfv0 on line 11 Notice: Undefined offset: 12 in /in/Arfv0 on line 11 Notice: Undefined offset: 105 in /in/Arfv0 on line 11
Output for hhvm-3.10.0 - 3.12.0
Output for 4.3.0 - 5.2.17
Notice: Undefined offset: 10 in /in/Arfv0 on line 11 Notice: Undefined offset: 12 in /in/Arfv0 on line 11 Notice: Undefined offset: 105 in /in/Arfv0 on line 11