3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sentence = strtolower('Cozy Qbert honks grawlix'); $usage = count_chars($sentence, 3); $alphabet = range('a', 'z'); var_export([ 'Sentence' => $sentence, 'Total Length' => strlen($sentence), 'Alphabetical Length' => preg_match_all('~[a-z]~', $sentence, $letters), 'Unused Letters' => array_diff($alphabet, $letters[0]), 'Duplicated Letters' => array_diff(array_count_values($letters[0]), [1]), ]);
based on X4kTQ
Output for 7.2.0 - 7.2.31, 7.3.0 - 7.3.19, 7.4.0 - 7.4.7, 8.0.0alpha1 - alpha2
array ( 'Sentence' => 'cozy qbert honks grawlix', 'Total Length' => 24, 'Alphabetical Length' => 21, 'Unused Letters' => array ( 3 => 'd', 5 => 'f', 9 => 'j', 12 => 'm', 15 => 'p', 20 => 'u', 21 => 'v', ), 'Duplicated Letters' => array ( 'o' => 2, 'r' => 2, ), )