3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array(array("source"=>"123","value"=>"1"),array("source"=>"567","value"=>"1"),array("source"=>"123","value"=>"1")); $arrays = array_unique($array); for($j=0;$j<sizeof($arrays);$j++) { for($i=0;$i<sizeof($array);$i++) { if($array[$i]["source"] == $arrays[$j]["source"]) { $array[$i]["value"]=$array[$i]["value"] + 1; break; } } }
Output for 5.4.0 - 7.1.0
Notice: Array to string conversion in /in/bKraB on line 3 Notice: Array to string conversion in /in/bKraB on line 3 Notice: Array to string conversion in /in/bKraB on line 3 Notice: Array to string conversion in /in/bKraB on line 3 Notice: Array to string conversion in /in/bKraB on line 3 Notice: Array to string conversion in /in/bKraB on line 3 Notice: Array to string conversion in /in/bKraB on line 3 Notice: Array to string conversion in /in/bKraB on line 3
Output for 4.3.0 - 5.3.29