3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $test_alfa = array(); $test_alfa[0] = "aa"; $test_alfa[1] = "aa"; $test_alfa[2] = "aa"; $test_alfa[3] = "bb"; $test_alfa[4] = "aa"; $test_alfa[5] = "bb"; $test_alfa[6] = "cc"; $test_alfa[7] = "bb"; $test_beta= array_unique($test_alfa); $numValues = count($test_beta); sort($test_beta); print_r($test_beta); echo ("Number of elements in test_beta = $numValues ");
based on uli8Y
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0rc3
Array ( [0] => aa [1] => bb [2] => cc ) Number of elements in test_beta = 3