Partners & Affiliates














[PHP-DEV] PHP 4.0 Bug #2956 Updated: array_walk not working as it did in php 3.0? From: Bug Database (php-dev <email protected>)
Date: 12/10/99

ID: 2956
User Update by: fvkuipers <email protected>
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

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>