3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $predefined=array(array("a","s"),array("b","s"), array("c","s"), array("e","s")); $return_arr=array(array("b","s"),array("c","s")); foreach($predefined as &$v) { $duplicate = false; foreach($return_arr as &$m) { if ($v['t'] === $m['t'] && $v['b'] !== $m['b']) $duplicate = true; } if($duplicate === true) $tmpArray[] = $m; if($duplicate === false) $tmpArray[] = $v; }; print_r($ids);
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined variable: ids in /in/eFCNi on line 15
Output for hhvm-3.10.0 - 3.12.0
Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9
Output for 5.0.4 - 5.2.17
Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined variable: ids in /in/eFCNi on line 15
Output for 5.0.0 - 5.0.3
Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: t in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined index: b in /in/eFCNi on line 9 Notice: Undefined variable: ids in /in/eFCNi on line 15
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in /in/eFCNi on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected '&', expecting T_VARIABLE or '$' in /in/eFCNi on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /in/eFCNi on line 5
Process exited with code 255.