3v4l.org

run code in 300+ PHP versions simultaneously
<?php $uniqueCount = 0; foreach (array_count_values(str_split('abclkjabc')) as $char => $count) { if ($count === 1) { ++$uniqueCount; } } echo $uniqueCount;

preferences:
26.14 ms | 405 KiB | 5 Q