php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11627 string '0' treated as empty
Submitted: 2001-06-23 07:54 UTC Modified: 2001-06-24 12:16 UTC
From: vgo at nrd dot lt Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: 4.0.5 OS: Windows 2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: vgo at nrd dot lt
New email:
PHP Version: OS:

 

 [2001-06-23 07:54 UTC] vgo at nrd dot lt
the string '0' is not empty but treated as empty

if( empty( '0' ) )
{

}

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-23 14:29 UTC] sniper@php.net
Yes, this is intentional. Check the manual page for it:

http://www.php.net/empty


 [2001-06-24 12:16 UTC] brianlmoon@php.net
Actually, you should get an error on that line.

empty takes a variable, not a value.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 03 08:01:29 2024 UTC