function all_unique_chars($s) {
$ascii = array_fill(0, 256, 0);
$size = strlen($s);
for ($i = 0; $i < $size; $i++) {
$ascii[ord($s[$i])] += 1;
if ($ascii[ord($s[$i])] > 1)
return false;
}
return true;
}
$str = "php javascript";
echo (all_unique_chars($str)) ? "yes" : "no";
/*
run:
no
*/