3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function myfunction_key($a,$b) {var_dump($a,$b); if ($a===$b) { return 0; } return ($a>$b)?1:-1; } function myfunction_value($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_uassoc($a1,$a2,"myfunction_key","myfunction_value");die; print_r($result);
based on vDMRZ
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_uassoc() in /in/bFpNv on line 24
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: array_udiff_uassoc() in /in/bFpNv on line 24
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: array_udiff_uassoc() in /in/bFpNv on line 24