#35051 [Opn->Bgs]: Problem with empty()
ID: 35051 User updated by: storm at mail dot up dot com dot ua Reported By: storm at mail dot up dot com dot ua -Status: Open +Status: Bogus Bug Type: Scripting Engine problem Operating System: FreeBsd 5.3 PHP Version: 5.0.5 New Comment: Sorry. Zend optimizer Previous Comments: [2005-11-01 14:57:12] storm at mail dot up dot com dot ua Description: Various results empty() for nonexistent key Reproduce code: --- $w=array('a'=>'','b'=>array('dd'=>1,'aa'=>2)); foreach($w as $k=>$v) { if(empty($v['dd'])) echo "{$k}:empty\n"; else echo "{$k}:no empty\n"; } Expected result: a:empty b:no empty (PHP 5.03 FreeBsd 4.9) Actual result: -- a:no empty b:no empty (PHP 5.05 FreeBsd 5.3) -- Edit this bug report at http://bugs.php.net/?id=35051&edit=1
#35051 [NEW]: Problem with empty()
From: storm at mail dot up dot com dot ua Operating system: FreeBsd 5.3 PHP version: 5.0.5 PHP Bug Type: Scripting Engine problem Bug description: Problem with empty() Description: Various results empty() for nonexistent key Reproduce code: --- $w=array('a'=>'','b'=>array('dd'=>1,'aa'=>2)); foreach($w as $k=>$v) { if(empty($v['dd'])) echo "{$k}:empty\n"; else echo "{$k}:no empty\n"; } Expected result: a:empty b:no empty (PHP 5.03 FreeBsd 4.9) Actual result: -- a:no empty b:no empty (PHP 5.05 FreeBsd 5.3) -- Edit bug report at http://bugs.php.net/?id=35051&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35051&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35051&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35051&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=35051&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=35051&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35051&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=35051&r=needscript Try newer version: http://bugs.php.net/fix.php?id=35051&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35051&r=support Expected behavior: http://bugs.php.net/fix.php?id=35051&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35051&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35051&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=35051&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35051&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=35051&r=dst IIS Stability: http://bugs.php.net/fix.php?id=35051&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35051&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35051&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35051&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=35051&r=mysqlcfg