3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function myfunction_value($a,$b) { var_dump($a,$b); if ($a===$b) { return 0; } return ($a>$b)?1:-1; } $a1=array("a"=>"red","b"=>"green","c"=>"blue"); $a2=array("a"=>"red","b"=>"green","c"=>"green"); $result=array_udiff_assoc($a1,$a2,"myfunction_value");die; print_r($result);
based on bFpNv
Output for 5.0.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
string(3) "red" string(3) "red" string(5) "green" string(5) "green" string(4) "blue" string(5) "green"
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: array_udiff_assoc() in /in/b5LJ6 on line 17
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: array_udiff_assoc() in /in/b5LJ6 on line 17
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: array_udiff_assoc() in /in/b5LJ6 on line 17