Re: Idea to extend language: Explicitly setting variable scope inside user defined function (longer)

From: Date: Mon, 21 Oct 2002 17:06:56 +0000
Subject: Re: Idea to extend language: Explicitly setting variable scope inside user defined function (longer)
References: 1 2 3 4 5 6 7  Groups: php.dev 
Request: Send a blank email to php-dev+get-89810@lists.php.net to get a copy of this message
> You still need to construct an array, with take a processor time, and when > you pass it to the function you still need to "unpack" it, this action take > a processor time... you mean to use 'extract()' ? > > Nope. extract() is bad thing for me. Because I am not modifying the $parameters array it is not copied but used by reference which is fast. But yes the construction of the array is slow. Somewhere in the past I read a message from Andi (not totally sure) about paramaters passing in such manner. The use of named parameters on call was proposed last year by Thies two months before I got the idea for that. It was supposed that it will come it php5 but it won't. Finally, I saw a benchmark which showed that the use of global variable is two times slower than use of local one. Andrey

« previous php.dev (#89810) next »