note 118098 added to function.ctype-digit
| From: | error17191 at gmail dot com | Date: | Sat, 03 Oct 2015 01:41:51 +0000 |
| Subject: | note 118098 added to function.ctype-digit | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-203899@lists.php.net to get a copy of this message | ||
I just wanted to clarify a flaw in the function is_digit() suggested by "info at
directwebsolutions dot nl " ..
It returns true in case of negative integers and false in case of strings that contain negative
integers .
example:
is_digit(-10); // returns ture
is_digit('-10'); // returns false
----
Server IP: 72.52.91.14
Probable Submitter: 197.160.96.48
----
Manual Page -- http://php.net/manual/en/function.ctype-digit.php
Edit -- https://master.php.net/note/edit/118098
Del: integrated -- https://master.php.net/note/delete/118098/integrated
Del: useless -- https://master.php.net/note/delete/118098/useless
Del: bad code -- https://master.php.net/note/delete/118098/bad+code
Del: spam -- https://master.php.net/note/delete/118098/spam
Del: non-english -- https://master.php.net/note/delete/118098/non-english
Del: in docs -- https://master.php.net/note/delete/118098/in+docs
Del: other reasons-- https://master.php.net/note/delete/118098
Reject -- https://master.php.net/note/reject/118098
Search -- https://master.php.net/manage/user-notes.php