3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x = ['1', '2']; $y = ['2', '1']; $z = ['1', '2', '4']; $n = [1, 2]; echo array_diff($x, $y) === array_diff($y, $x) ? 'y1' : 'n1'; echo array_diff($x) === array_diff($z) ? 'y2' : 'n2'; echo array_diff($z); echo array_diff($x) === array_diff($n) ? 'y3' : 'n3';
Output for hhvm-3.10.1
y1 Warning: array_diff() expects exactly 2 parameters, 1 given in /in/t6duF on line 9 Warning: array_diff() expects exactly 2 parameters, 1 given in /in/t6duF on line 9 y2 Warning: array_diff() expects exactly 2 parameters, 1 given in /in/t6duF on line 10 Warning: array_diff() expects exactly 2 parameters, 1 given in /in/t6duF on line 11 Warning: array_diff() expects exactly 2 parameters, 1 given in /in/t6duF on line 11 y3