3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = [1,2,3]; $b = [3,1,2]; $c = [1,2,"3"]; $asorted = $a; $bsorted = $b; $csorted = $c; sort($asorted); sort($bsorted); sort($csorted); var_dump(array_diff($a, $b)); var_dump(array_diff($a, $c)); var_dump(array_diff($b, $a)); var_dump(array_diff($c, $a)); var_dump($b == $a); var_dump($b === $a); var_dump($c == $a); var_dump($c === $a); var_dump($bsorted == $asorted); var_dump($bsorted === $asorted); var_dump($csorted == $asorted); var_dump($csorted === $asorted);
based on EtLmc
Output for 5.5.0 - 7.3.0rc3
array(0) { } array(0) { } array(0) { } array(0) { } bool(false) bool(false) bool(true) bool(false) bool(true) bool(true) bool(true) bool(false)