note 91143 added to function.ctype-digit
| From: | Tyrunur at osu1 dot php dot net | Date: | Wed, 27 May 2009 10:13:55 +0000 |
| Subject: | note 91143 added to function.ctype-digit | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-156054@lists.php.net to get a copy of this message | ||
<?php
$testcases = array ("123", "abc", "1bc", "", true, false,
array("123","456"), new DateTime("1990-01-01"), NULL);
foreach ($testcases as $test) {
echo ctype_digit ($test);
}
?>
Output: 1
Its stunning how badly this stuff is coded. Most of the time it doesn't return anything at all.
Not even false. Seriously needs a revision.
----
Server IP: 217.13.201.10
Probable Submitter: 77.132.34.82
----
Manual Page -- http://www.php.net/manual/en/function.ctype-digit.php
Edit -- https://master.php.net/note/edit/91143
Del: integrated -- https://master.php.net/note/delete/91143/integrated
Del: useless -- https://master.php.net/note/delete/91143/useless
Del: bad code -- https://master.php.net/note/delete/91143/bad+code
Del: spam -- https://master.php.net/note/delete/91143/spam
Del: non-english -- https://master.php.net/note/delete/91143/non-english
Del: in docs -- https://master.php.net/note/delete/91143/in+docs
Del: other reasons-- https://master.php.net/note/delete/91143
Reject -- https://master.php.net/note/reject/91143
Search -- https://master.php.net/manage/user-notes.php