|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54146 0 not valid float
Submitted: 2011-03-03 02:23 UTC Modified: 2011-03-03 14:11 UTC
From: zb at nospam dot dk Assigned:
Status: Not a bug Package: Filter related
PHP Version: 5.3SVN-2011-03-03 (SVN) OS: OSX and 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.
Bug Type:
From: zb at nospam dot dk
New email:
PHP Version: OS:


 [2011-03-03 02:23 UTC] zb at nospam dot dk
From manual page:

As I understand the documentation, 0 (zero) should be a valid float, but it fails 
while testing.

Test script:

if (!filter_var($var, FILTER_VALIDATE_FLOAT))
echo "Not valid";
echo "Valid";



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-03-03 14:11 UTC]
-Status: Open +Status: Bogus
 [2011-03-03 14:11 UTC]
0 == false. Need to check return value a little more closely.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Feb 23 05:01:27 2024 UTC