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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: shagren at ua dot fm
New email:
PHP Version: OS:

 

 [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 06:03:48 2022 UTC