1.2.1493. ext/ctype¶
Extension ext/ctype.
Ext/ctype checks whether a character or string falls into a certain character class according to the current locale.
<?php
$strings = array('AbCd1zyZ9', 'foo!#$bar');
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";
}
}
?>
See also Ctype functions.
1.2.1493.1. Connex PHP features¶
1.2.1493.1.1. Specs¶
Short name |
Extensions/Extctype |
Rulesets |
|
Exakat since |
0.8.4 |
PHP Version |
All |
Severity |
|
Time To Fix |
|
Precision |
Very high |
Available in |