PHP 4.0 Bug #2956 Updated: array_walk not working as it did in php 3.0?
| From: | Bug Database | Date: | Sat, 11 Dec 1999 02:00:35 +0000 |
| Subject: | PHP 4.0 Bug #2956 Updated: array_walk not working as it did in php 3.0? | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-13572@lists.php.net to get a copy of this message | ||
ID: 2956
User Update by: fvkuipers@home.com
Status: Open
Bug Type: Misbehaving function
Description: array_walk not working as it did in php 3.0?
Actually, it also states in the php3 documentation for array_walk that:
"func will actually be working with the elements of arr, so any changes made to those elements
will actually be made in the array itself"
However this is not true in php4 yet... I had to put a & before the $item1 parameter of
test_alter to get the changes back to the array. This is also not similar to php3 behaviour.
Removing the '&' will not return the changes to the array.
Unfortunately, I realized this immediately after I clicked submit the first time...
HTH.
Fred again!
Full Bug description available at: http://bugs.php.net/version4/?id=2956