3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'abclkjabc'; $notRepeated = []; foreach (count_chars($string, 1) as $char => $count) { if ($count === 1) { $notRepeated[] = chr($char); } } var_export($notRepeated); echo "\nCount = " . count($notRepeated);

preferences:
25.35 ms | 402 KiB | 5 Q