php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31811 is_numeric() works diffirent in different versions
Submitted: 2005-02-02 13:31 UTC Modified: 2005-02-02 15:40 UTC
From: shagren at ua dot fm Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: 4.3.10 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
30 - 15 = ?
Subscribe to this entry?

 
 [2005-02-02 13:31 UTC] shagren at ua dot fm
Description:
------------
In old versions(i try 4.3.2 cgi) and 5.0 is_numeric("-.12") return "1", but in 4.3.10(apache/mod_php) result are false(bool).

Reproduce code:
---------------
<?
echo is_numeric("-.12");
?>

Expected result:
----------------
1


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-02 15:40 UTC] shagren at ua dot fm
I try this versions on Windows(mod_php/apache2, CGI/IIS) and Linux(CGI) and all good. is_numeric("-.12") return 1.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Jul 06 17:05:44 2022 UTC