Re: [PHP4BETA] Varargs user function?

From: Date: Tue, 21 Sep 1999 07:06:37 +0000
Subject: Re: [PHP4BETA] Varargs user function?
References: 1 2 3  Groups: php.version4 
Request: Send a blank email to php-version4+get-4768@lists.php.net to get a copy of this message
At 09:01 21/09/1999 , Kristian Köhntopp wrote:
Jakub Skopal wrote: and call it like: blah("one", "two", array("three", "four", "five")); ? Because I can already do this and it sucks, supportwise. page_open() in PHPLIB is a varargs function, and many people forget to write the array() which is currently needed for the varargs emulation. The programmatic interface suggested by Zeev is sufficient and complete to write real varargs functions, so I don't complain. I just added a request for access to the function parameter hash and the local variable hash using pseudo-variables like "$GLOBALS[]", because I think it is so elegant. But this is really just sugar.
Well, the main problem with that approach is that in PHP 4.0, it's no longer a hash, but some kind of stack (for performance reasons). I guess I could implement a function that returns all of the arguments as an array, though. Zeev -- Zeev Suraski <zeev@zend.com> http://www.zend.com/ For a PGP public key, finger bourbon@netvision.net.il

« previous php.version4 (#4768) next »