#32943 [Opn->Csd]: is_numeric validates "3e0"

From: Date: Tue, 20 Sep 2005 12:31:27 +0000
Subject: #32943 [Opn->Csd]: is_numeric validates "3e0"
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969370227@lists.php.net to get a copy of this message
ID: 32943 Updated by: vrana@php.net Reported By: pmorgan at ukds dot net -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: Irrelevant PHP Version: Irrelevant New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. "Numeric strings consist of optional sign, any number of digits, optional decimal part and optional exponential part. Thus +0123.45e6 is a valid numeric value. Hexadecimal notation (0xFF) is allowed too but only without sign, decimal and exponential part." Previous Comments: ------------------------------------------------------------------------ [2005-09-08 13:21:15] betz@php.net reopen this as documentation bug. "number" could also be given in e-notation, hex-notation, octal-notation ------------------------------------------------------------------------ [2005-05-04 14:40:45] pmorgan at ukds dot net That needs to go into the manual "number in e-notation", which I understand, or even better as an additional flag "allow_e-notation". It's the last error I would have expected and is very misleading AFAIK. ------------------------------------------------------------------------ [2005-05-04 12:28:04] pmorgan at ukds dot net Description: ------------ With some server side validation I inadvertenly entered "3e0" into the textbox, it validated to my suprise. Would have expected this to throw a false Reproduce code: --------------- echo is_numeric('3e00')? 'true': 'false'; Expected result: ---------------- false; In fact anything without 0-9 and a . I would expect a false ! ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=32943&edit=1

« previous php.doc (#969370227) next »