3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $alpha = 'aabbccddeeffgghhiijjkk'; $alphaArray = str_split($alpha); $uniqArray = array_unique($alphaArray); $diff = array_diff_assoc($alphaArray, $uniqArray); var_dump($diff);
based on B24jH
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.2.6
array(11) { [1]=> string(1) "a" [3]=> string(1) "b" [5]=> string(1) "c" [7]=> string(1) "d" [9]=> string(1) "e" [11]=> string(1) "f" [13]=> string(1) "g" [15]=> string(1) "h" [17]=> string(1) "i" [19]=> string(1) "j" [21]=> string(1) "k" }