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
Have you experienced this issue?
Rate the importance of this bug to you:

 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Wed Jul 03 09:01:29 2024 UTC