php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #27753 Logic bug in empty() documentation
Submitted: 2004-03-29 09:59 UTC Modified: 2004-03-29 13:40 UTC
From: chris+php at chrullrich dot de Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2004-03-29 09:59 UTC] chris+php at chrullrich dot de
Description:
------------
The documentation for empty() states:

    "empty() returns FALSE if var has a 
     non-empty or non-zero value."

Leaving aside the fact that empty()'s behavior of returning TRUE if the variable contains the string "0" is completely useless, the documentation is wrong. It should read:

    "empty() returns FALSE if var has a 
     non-empty and non-zero value."
               ^^^




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-29 13:40 UTC] irchtml@php.net
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.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Nov 20 02:00:01 2025 UTC