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

At 02:00 AM 12/11/99 +0000, Bug Database wrote:
>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...

In PHP4 you need to explicitly specify & to have it work as a reference.
You shouldn't use php3 documentation when working with PHP4.

-Andrei

-- 
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>