- var_dump: documentation ( source)
- array_unique: documentation ( source)
<?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]
));