3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = [1, 2, 1, 5, 7, 5, 8]; $newArray = array_unique($array); var_dump($newArray);
based on N7dWe
Output for 5.5.0 - 7.2.6
array(5) { [0]=> int(1) [1]=> int(2) [3]=> int(5) [4]=> int(7) [6]=> int(8) }