3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $itemList = array( array(0), array(1), array(1,0), array(0,1), array(0,1,2,3,4), array(new stdClass), array(new stdClass, new stdClass), array(new stdClass, new stdClass, new stdClass) ); function doCompare($a, $b){ return $a === $b; }; foreach ($itemList as $item) { var_dump(array_udiff($item, $item, 'doCompare')); }
based on cfUA0
Output for 5.0.0 - 7.1.0
array(1) { [0]=> int(0) } array(1) { [0]=> int(1) } array(0) { } array(0) { } array(0) { } array(1) { [0]=> object(stdClass)#1 (0) { } } array(0) { } array(0) { }
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: array_udiff() in /in/YLPBf on line 19
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: array_udiff() in /in/YLPBf on line 19
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: array_udiff() in /in/YLPBf on line 19