Date: 01/08/01
- Next message: cynic <email protected>: "[PHP-DEV] PHP 4.0 Bug #8490 Updated: error_log configuration"
- Previous message: anonymous <email protected>: "[PHP-DEV] CVS Account Request"
- In reply to: Cynic: "[PHP-DEV] http://bugs.php.net/bugs.php?id=8409"
- Next in thread: Andrei Zmievski: "Re: [PHP-DEV] http://bugs.php.net/bugs.php?id=8409"
- Reply: Andrei Zmievski: "Re: [PHP-DEV] http://bugs.php.net/bugs.php?id=8409"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sat, Jan 06, 2001 at 04:58:53AM +0100, Cynic wrote:
> Can arrays in PHP change a bit, or are they carved in stone
> yet? Is, for example, change to extract() so that
>
> $a = array( 'aaa' , 'bbb' , 'ccc' ) ;
> extract( $a , EXTR_PREFIX_ALL , 'prefix' ) ;
>
> creates $prefix_1 , $prefix_2, and $prefix_3 in current scope?
> And what about changing it so that it returns? I'd like to see
> extract() return maybe number of variables it created.
This sounds like a good idea, should be backwards compatible. Except
that I think the result should be
creates $prefix0, $prefix1, and $prefix2 in your case. After all the
indices are 0, 1 and 2, and adding _ doesn't seem natural. You can
call your prefix prefix_ then.
To return the number of variables sounds good to me, but won't it
always be the same as the number of elements in the array?
Stig
-- 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>
- Next message: cynic <email protected>: "[PHP-DEV] PHP 4.0 Bug #8490 Updated: error_log configuration"
- Previous message: anonymous <email protected>: "[PHP-DEV] CVS Account Request"
- In reply to: Cynic: "[PHP-DEV] http://bugs.php.net/bugs.php?id=8409"
- Next in thread: Andrei Zmievski: "Re: [PHP-DEV] http://bugs.php.net/bugs.php?id=8409"
- Reply: Andrei Zmievski: "Re: [PHP-DEV] http://bugs.php.net/bugs.php?id=8409"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

