3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** from http://php.net/manual/en/function.array-unique.php : BY DEFAULT: Note: Two elements are considered equal if and only if (string) $elem1 === (string) $elem2 i.e. when the string representation is the same, the first element will be used. */ //this will include false and 0, but will not include '' and null: var_dump(array_unique([ false,0,'',null] ));

preferences:
54.29 ms | 402 KiB | 5 Q