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 Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
33 - 33 = ?
Subscribe to this entry?

 
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2019 The PHP Group
All rights reserved.
Last updated: Thu Aug 22 13:01:27 2019 UTC