php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35051 Problem with empty()
Submitted: 2005-11-01 14:57 UTC Modified: 2005-11-01 17:34 UTC
From: storm at mail dot up dot com dot ua Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.0.5 OS: FreeBsd 5.3
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: storm at mail dot up dot com dot ua
New email:
PHP Version: OS:

 

 [2005-11-01 14:57 UTC] storm at mail dot up dot com dot ua
Description:
------------
Various results empty() for nonexistent key 

Reproduce code:
---------------
$w=array('a'=>'aaaa','b'=>array('dd'=>1,'aa'=>2));

foreach($w as $k=>$v)
{
        if(empty($v['dd']))
                echo "{$k}:empty<br>\n";
        else
                echo "{$k}:no empty<br>\n";
}


Expected result:
----------------
a:empty<br>  
b:no empty<br>

(PHP 5.03 FreeBsd 4.9)

Actual result:
--------------
a:no empty<br>  
b:no empty<br>

(PHP 5.05 FreeBsd 5.3)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-01 17:34 UTC] storm at mail dot up dot com dot ua
Sorry. Zend optimizer
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 13 04:01:34 2025 UTC