3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array(new stdClass, new stdClass, new stdClass); for ($i = 0; $i < 3; $i++) { for ($j = 0; $j <= $i; $j++) { $x = $array[$i]; $y = $array[$j]; if ($x < $y) print("$i<$j "); if ($x > $y) print("$i>$j "); if ($x == $y) print("$i===$j "); print(" "); } print("\n"); } var_dump(array_udiff()); print("\n"); $array[0]->a = 10; $array[1]->a = 30; $array[2]->a = 20; for ($i = 0; $i < 3; $i++) { for ($j = 0; $j <= $i; $j++) { $x = $array[$i]; $y = $array[$j]; if ($x < $y) print("$i<$j "); if ($x > $y) print("$i>$j "); if ($x == $y) print("$i===$j "); print(" "); } print("\n"); }
based on EWYrk
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
0===0 1===0 1===1 2===0 2===1 2===2 Warning: array_udiff(): at least 3 parameters are required, 0 given in /in/cLsCF on line 17 NULL 0===0 1>0 1===1 2>0 2<1 2===2
Output for hhvm-3.12.0
0===0 1===0 1===1 2===0 2===1 2===2 Warning: array_udiff() expects exactly 3 parameters, 0 given in /in/cLsCF on line 17 NULL 0===0 1>0 1===1 2>0 2<1 2===2
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.0.0 - 5.2.17
0===0 1===0 1===1 2===0 2===1 2===2 Warning: Wrong parameter count for array_udiff() in /in/cLsCF on line 17 NULL 0===0 1>0 1===1 2>0 2<1 2===2
Output for 4.4.5 - 4.4.9
0===0 1===0 1===1 2===0 2===1 2===2 Fatal error: Call to undefined function: array_udiff() in /in/cLsCF on line 17
Process exited with code 255.
Output for 4.3.2 - 4.4.4
0===0 1===0 1===1 2===0 2===1 2===2 Fatal error: Call to undefined function: array_udiff() in /in/cLsCF on line 17
Process exited with code 255.
Output for 4.3.0 - 4.3.1
0===0 1===0 1===1 2===0 2===1 2===2 Fatal error: Call to undefined function: array_udiff() in /in/cLsCF on line 17