Re: How can I use a function's default arguments but change one of the end ones in the list?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



German Geek wrote:
> I've thought about this problem before but couldn't think of a solution
> either. How does func_get_args() solve this? You could make a wrapper
> function without that.
> 
> How would u (php) know which parameter u mean in a particular case?
> 
> I think it would just be useful to have an IDE that can write out the
> default parameters on a keyboard shortcut or mouse click and then u can
> change them afterwards.
> 
> Cheers,
> Tim
> 
> Tim-Hinnerk Heuer
> 
> http://www.ihostnz.com
> 

Well, using func_get_args() you can pass whatever you want and parse the
args to see what was passed and assign default values if a specific arg
wasn't passed.

I however would probably pass an associative array to the func and parse
that.
-- 
Thanks!
-Shawn
http://www.spidean.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux