[prev in list] [next in list] [prev in thread] [next in thread]
List: php-doc-bugs
Subject: [DOC-BUGS] Doc #55742 [Opn->Csd]: Description of what happens if you pass a number
From: "birke at d-scribe dot de" <php-bugs () lists ! php ! net>
Date: 2011-09-20 16:03:30
Message-ID: E1R62nC-0007JS-HH () sgrv2 ! php ! net
[Download RAW message or body]
Edit report at https://bugs.php.net/bug.php?id=55742&edit=1
ID: 55742
User updated by: birke at d-scribe dot de
Reported by: birke at d-scribe dot de
Summary: Description of what happens if you pass a number
-Status: Open
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
PHP Version: 5.3.8
Block user comment: N
Private report: N
New Comment:
Not needed, the cytpe intro docs explain it.
Previous Comments:
------------------------------------------------------------------------
[2011-09-20 15:59:23] birke at d-scribe dot de
Description:
------------
---
From manual page: http://www.php.net/function.ctype-alnum
---
There should be the following warning in the docs:
If you are passing in a number, ctype_alnum will return false for all numbers that do \
not represent alphanumeric character codes (see chr).
Test script:
---------------
<?php
$myVar = 10;
echo ctype_alnum($myVar) ? "T" : "F"; // returns F
$myVar = 48;
echo ctype_alnum($myVar) ? "T" : "F"; // returns T, because ASCII 48 = "a"
$myVar = "10";
echo ctype_alnum($myVar) ? "T" : "F"; // returns T
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55742&edit=1
--
PHP Documentation Bugs Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic