note 102011 added to function.is-numeric
| From: | sobolanx at gmail dot com | Date: | Sat, 22 Jan 2011 23:55:26 +0000 |
| Subject: | note 102011 added to function.is-numeric | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-176015@lists.php.net to get a copy of this message | ||
Note that the function accepts extremely big numbers and correctly evaluates them.
For example:
<?php
$v = is_numeric ('58635272821786587286382824657568871098287278276543219876543') ? true :
false;
var_dump ($v);
?>
The above script will output:
bool(true)
So this function is not intimidated by super-big numbers. I hope this helps someone.
PS: Also note that if you write is_numeric (45thg), this will generate a parse error (since the
parameter is not enclosed between apostrophes or double quotes). Keep this in mind when you use this
function.
----
Server IP: 69.147.83.197
Probable Submitter: 188.24.34.169
----
Manual Page -- http://www.php.net/manual/en/function.is-numeric.php
Edit -- https://master.php.net/note/edit/102011
Del: integrated -- https://master.php.net/note/delete/102011/integrated
Del: useless -- https://master.php.net/note/delete/102011/useless
Del: bad code -- https://master.php.net/note/delete/102011/bad+code
Del: spam -- https://master.php.net/note/delete/102011/spam
Del: non-english -- https://master.php.net/note/delete/102011/non-english
Del: in docs -- https://master.php.net/note/delete/102011/in+docs
Del: other reasons-- https://master.php.net/note/delete/102011
Reject -- https://master.php.net/note/reject/102011
Search -- https://master.php.net/manage/user-notes.php