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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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 May 13 10:01:27 2025 UTC