3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $first = Array(607,608,609,610); $second = Array(607,608,609,800); $Fcount = count($first); $arr = array_merge($first, $second); $arrc= array_diff($arr, array_diff_assoc($arr, array_unique($arr))); foreach ($arrc as $key => $value){ echo $key; if($arrc >= $Fcount){ echo "first array". $value; }else{ echo "second array" . $value; } }
based on qq71i
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0rc3
3first array6107first array800