#31123 [Opn->Bgs]: Change of return values
| From: | derick@php.net | Date: | Thu, 16 Dec 2004 13:37:30 +0000 |
| Subject: | #31123 [Opn->Bgs]: Change of return values | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-70356@lists.php.net to get a copy of this message | ||
ID: 31123
Updated by: derick@php.net
Reported By: bate@php.net
-Status: Open
+Status: Bogus
Bug Type: *General Issues
Operating System: FreeBSD
PHP Version: 4.3.10
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions.
Thank you for your interest in PHP.
Get rid/upgrade your Zend extensions, no bug here.
Previous Comments:
------------------------------------------------------------------------
[2004-12-16 14:35:28] bate@php.net
Description:
------------
foreach mechanism changed. foreach returns now the array not the key.
This changed from 4.3.9 to 4.3.10
5.0.x retuns too as $key the sub arrays
Reproduce code:
---------------
<pre>
<?php
$demo_array = array('one', 'two', 'three');
print_r(array_keys($demo_array));
echo "\n\n";
foreach(array_keys($demo_array) as $key)
{
echo $key."<br>";
}
?>
Expected result:
----------------
Array
(
[0] => 0
[1] => 1
[2] => 2
)
0
1
2
Actual result:
--------------
Array
(
[0] => 0
[1] => 1
[2] => 2
)
Array
Array
Array
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31123&edit=1