3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a1 = array('red'); $a2 = array('red', 'blue'); $diff = array_udiff($a1, $a2, function($a, $b) { if($a === $b) { return 0; } else { return -1; } }); var_dump($diff);
based on 4U1bv
Output for 7.0.0 - 7.2.0
array(0) { }
Output for 5.3.19 - 5.6.28
array(1) { [0]=> string(3) "red" }