#43258 [Opn]: Next() function behavior changed
| From: | frankw at well dot com | Date: | Mon, 12 Nov 2007 08:21:22 +0000 |
| Subject: | #43258 [Opn]: Next() function behavior changed | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-119485@lists.php.net to get a copy of this message | ||
ID: 43258
User updated by: frankw at well dot com
Reported By: frankw at well dot com
Status: Open
Bug Type: Scripting Engine problem
Operating System: W2K
PHP Version: 5.2CVS-2007-11-12 (snap)
New Comment:
Old PHP version: 4.3.10, new version 5.2.5. Both on Windows 2000.
Previous Comments:
------------------------------------------------------------------------
[2007-11-12 08:19:05] frankw at well dot com
Description:
------------
The behavior of the next() function has changed between versions 4 and
5.
Reproduce code:
---------------
<?php
$a = array( "a", "b", "c");
foreach ($a as $aa) {
print($aa);
if (next($a))
print(" + ");
}
?>
Expected result:
----------------
a + b + c
Actual result:
--------------
a + bc
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43258&edit=1