php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #36074 Offer to upgrade ctype_alnum() function
Submitted: 2006-01-18 23:22 UTC Modified: 2006-01-19 13:09 UTC
From: 10cent at mail dot ru Assigned:
Status: Wont fix Package: Feature/Change Request
PHP Version: 5.1.2 OS: all
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: 10cent at mail dot ru
New email:
PHP Version: OS:

 

 [2006-01-18 23:22 UTC] 10cent at mail dot ru
Description:
------------
I think, that's good idea to add the second parameter to ctype_alnum() function.
See: bool ctype_alnum ( string text [, string register] )
Default "i". Also may be "u" and "l".
i - ignore register
u - uppercase
l - lowercase

ctype_alnum($string, "i") equivalent preg_match("/^[0-9A-z]*$/", $string)
ctype_alnum($string, "u") equivalent preg_match("/^[0-9A-Z]*$/", $string)
ctype_alnum($string, "l") equivalent preg_match("/^[0-9a-z]*$/", $string)

Sorry for my bad english.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-01-18 23:49 UTC] tony2001@php.net
No need to duplicate functionality 100+ times.
Also, isalnum() function (which is actually stands behind the ctype_alnum()) doesn't have such parameters - see `man isalnum`.
 [2006-01-19 13:09 UTC] 10cent at mail dot ru
I can't find isalnum() function in manual.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 13 14:01:31 2025 UTC