3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = array('AbCd1zyZ9', 'abcd'); foreach ($strings as $testcase) { if (ctype_alnum($testcase)) { echo "The string $testcase consists of all letters or digits.\n"; } else { echo "The string $testcase does not consist of all letters or digits.\n"; } }

preferences:
48.71 ms | 402 KiB | 5 Q