3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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] ));
based on B5Fdc
Output for 5.6.0 - 5.6.30, hhvm-3.12.14 - 3.17.3, 7.0.0 - 7.3.0rc3
array(2) { [0]=> bool(false) [1]=> int(0) }