|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-07-16 18:19 UTC] jani@php.net
[2007-08-16 12:09 UTC] vrana@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 21 10:00:01 2025 UTC |
Description: ------------ ctype_alnum returns false if you pass it an integer (ie 7). I know the docs say that it should receive a string, as all ctype_* functions should, but I believe it's pointless to have to do a ctype_alnum( '' . $var ) at every call just to be sure. Also, the docs say that the function is equivalent to preg_match('/^[a-z0-9]+$/iD', $text) and matching 7 against that expression will work. Reproduce code: --------------- var_dump( ctype_alnum( 7 ) ); Expected result: ---------------- bool(true) Actual result: -------------- bool(false)