From: daniel at spector dot ie Operating system: Win2K PHP version: 5.0.2 PHP Bug Type: Strings related Bug description: empty string evaluates to string(0) php4.3.4 to string(1) in 5.0.2
Description: ------------ PHP4.3.4 to PHP5.0.2 empty('') string evaluates to string(0) on 4.3.4(x?) and string(1) on php5.0.2. Can be reproduced with code below. Thanks alot in advance. Reproduce code: --------------- //an empty string $suffix=''; var_dump($suffix); $msg = (empty($suffix)) ? 'php4' : 'php5'; echo $msg; /* * on php4 var_dump returns string(0) msg returns php4 * on php5 var_dump returns string(1) msg returns php5 */ -- Edit bug report at http://bugs.php.net/?id=30360&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30360&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30360&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30360&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=30360&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=30360&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30360&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30360&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30360&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30360&r=support Expected behavior: http://bugs.php.net/fix.php?id=30360&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30360&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30360&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=30360&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30360&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=30360&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30360&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30360&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30360&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30360&r=mysqlcfg