note 16310 added to function.is-numeric
| From: | mjbraca at NOSPAM dot hotmail dot com | Date: | Wed, 24 Oct 2001 14:36:14 +0000 |
| Subject: | note 16310 added to function.is-numeric | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-19375@lists.php.net to get a copy of this message | ||
Some examples. Note that leading white space is OK, but not trailing white space, and there
can't be white space between the "-" and the number.
is_numeric("1,000") = F
is_numeric("1e2") = T
is_numeric("-1e-2") = T
is_numeric("1e2.3") = F
is_numeric("1.") = T
is_numeric("1.2") = T
is_numeric("1.2.3") = F
is_numeric("-1") = T
is_numeric("- 1") = F
is_numeric("--1") = F
is_numeric("1-") = F
is_numeric("1A") = F
is_numeric(" 1") = T
is_numeric("1 ") = F
--
http://www.php.net/manual/en/function.is-numeric.php
http://master.php.net/manage/user-notes.php?action=edit+16310
http://master.php.net/manage/user-notes.php?action=delete+16310
http://master.php.net/manage/user-notes.php?action=reject+16310