3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr1 = [1, 4, 5, 7]; $arr2 = [2, 3, 4, 6]; $arrint = array_uintersect($arr1, $arr2, function ($a, $b) { return ($a === $b) ? 0 : (($a > $b) ? 1 : -1); }); var_dump($arrint);
based on 1MdSi
Output for 5.4.8 - 7.2.0
array(1) { [1]=> int(4) }
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/pY7Wo on line 3
Process exited with code 255.