|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16528 Incompatible behaviour of arrays (and maybe other vars)
Submitted: 2002-04-10 06:05 UTC Modified: 2002-04-10 06:26 UTC
From: ssilk at fidion dot de Assigned:
Status: Not a bug Package: Variables related
PHP Version: 4.1.2 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: ssilk at fidion dot de
New email:
PHP Version: OS:


 [2002-04-10 06:05 UTC] ssilk at fidion dot de
In PHP 4.0 you can write the following:

if ( empty($a['bla']) )

There are no errors or warnings, even if all warnings has been put on (as we do).

in PHP 4.1 this code complains the missing index 'bla':
Warning: Uninitialized string offset: 0 in  ....


if ( empty($a) and empty($a['bla']) ) ....

which seems not to be very logical. $a['bla'] must be empty, if $a is empty...


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-10 06:21 UTC]
Can you try 4.2.0RC2 or 3 from
 [2002-04-10 06:26 UTC]
This is not a bug. Please double-check the documentation available
at and the instructions on how to report
a bug at
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Feb 23 18:01:28 2024 UTC