3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(array_unique(array(0,"","0"))); var_dump(array_unique(array("","0",0)));
based on tdtKv
Output for 4.3.0 - 5.2.8, 5.2.10 - 7.2.0
array(2) { [0]=> int(0) [1]=> string(0) "" } array(2) { [0]=> string(0) "" [1]=> string(1) "0" }
Output for 5.2.9
array(1) { [0]=> int(0) } array(2) { [0]=> string(0) "" [1]=> string(1) "0" }