Re: Named arguments

From: Date: Mon, 14 Apr 2003 04:10:51 +0000
Subject: Re: Named arguments
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-143711@lists.php.net to get a copy of this message
Nope, but you don't HAVE to write out 'NULL' - you can simply pass 0. Mike "Sparky Kopetzky" <sparkyk@blackmesa-isp.net> wrote in message news:000801c30239$16357760$82dbfcd0@blackmesaisp.net... Gotta question for all of the gurus... I know you can have default values in a function. Is there anyway you can use 'named arguments' like Visual Basic?? I've got a large number of functions that I need to call is this manner. The use of 'NULL' 40,000 times is a major pain in the posterior to fill all of the missing arguments. If the writers of PHP could add a ability like this, they would be right up there with Twinkies, Yoo-Hoo's and God: function _browser($html_version = false, $explorer_version = false, $navigator_version = false) { blah-blah-blah; } $value = _browser($navigator_version := true); Just hoping someone could add this feature to save grief and ulcers... Robin Kopetzky Black Mesa Computers/Internet Services

« previous php.general (#143711) next »