php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27647 empty() does not work correctly
Submitted: 2004-03-18 22:15 UTC Modified: 2004-03-23 13:40 UTC
From: simen at amaxit dot net Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: 4.3.5RC4 OS: Solaris 5.8 Sparc
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: simen at amaxit dot net
New email:
PHP Version: OS:

 

 [2004-03-18 22:15 UTC] simen at amaxit dot net
Description:
------------
empty() does not work correctly on Solaris 5.8 Sparc, but same code works well on Linux or FreeBSD.

Reproduce code:
---------------
$test[0] = 'field1';
$test[1] = 'field2';

for($i=0;!empty($test[$i]);$i++) {
    echo '<br>'.$test[$i];
}

Expected result:
----------------
field1
field2

Actual result:
--------------
nothing


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-23 13:40 UTC] iliaa@php.net
Works just fine with latest CVS. 
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 01 00:01:36 2025 UTC