php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6956 empty( "0" ) returns true
Submitted: 2000-09-29 23:54 UTC Modified: 2000-09-30 00:13 UTC
From: sb at phpopentracker dot de Assigned:
Status: Closed Package: Variables related
PHP Version: 4.0 Latest CVS (29/09/2000) OS: Windows 2000 Pro
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: sb at phpopentracker dot de
New email:
PHP Version: OS:

 

 [2000-09-29 23:54 UTC] sb at phpopentracker dot de
The following script

  <?php
    $str = "0";
    print empty( $str );
  ?>

outputs "true". Is this a bug or a feature?

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-09-30 00:13 UTC] sbergmann@php.net
  Dear Sebastian,

  please read the manual entry on empty().

  Yours,
Sebastian

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 01 20:01:36 2025 UTC