From: fire at firepages dot org
Operating system: win32 XP
PHP version: 5.0.0RC2
PHP Bug Type: Unknown/Other Function
Bug description: different output for simple loop in 5.* vs 4.3.*
Description:
------------
dunno how to describe , simply put the code below on 4.3.4 / 4.3.5 gives
(my) expected answer of '12'
on 5.0.0.b4 && RC2 the answer is '13'
unsure which is the correct behaviour ;)
Reproduce code:
---------------
<?
$word = 'Encyclopedia';
$x = 0;
while (!empty($word[$x])){
$x++;
}
echo "The word <b>$word</b> has $x characters in it.";
?>
Expected result:
----------------
The word Encyclopedia has 12 characters in it.
Actual result:
--------------
The word Encyclopedia has 13 characters in it.
--
Edit bug report at http://bugs.php.net/?id=28388&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28388&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28388&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=28388&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=28388&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=28388&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=28388&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=28388&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=28388&r=support
Expected behavior: http://bugs.php.net/fix.php?id=28388&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=28388&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=28388&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=28388&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28388&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=28388&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=28388&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=28388&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28388&r=float