Caution: ctype_alnum() will return false on integers.
<?php
var_dump(ctype_alnum('3')); // true
var_dump(ctype_alnum(3)); // false
?>
See http://bugs.php.net/bug.php?id=42007 .
ctype_alnum说明bool ctype_alnum ( string text )
Checks if all of the characters in the provided string,
范例
Sinured
22-Jul-2007 05:13
Caution: ctype_alnum() will return false on integers.
raj
09-Jul-2007 11:54
When checking strings with multiple words for non alphanumeric characters ctype_alnum would consider space as non alphanumeric character as well. | ||