fork(15) download
  1. <?php
  2. $strings = array('AbCd1zyZ9', 'foo!#$bar');
  3. foreach ($strings as $testcase) {
  4. if (ctype_alnum($testcase)) {
  5. echo 'The string ', $testcase, ' consists of all letters or digits.', PHP_EOL;
  6. } else {
  7. echo 'The string ', $testcase, ' don\'t consists of all letters or digits.', PHP_EOL;
  8. }
  9. }
Success #stdin #stdout 0.03s 52480KB
stdin
Standard input is empty
stdout
The string AbCd1zyZ9 consists of all letters or digits.
The string foo!#$bar don't consists of all letters or digits.