|
Posted by lawrence k on 04/16/07 05:19
One thing I like about Ruby is the use of symbols when passing
function parameters to a function. One thing I dislike about PHP is
that if a function has 4 optional parameters but you want to do
something with the 4th one, you need to put in something, perhaps
empty strings, for the first 3 parameters, even though you've no
interest in using them.
I'm wondering if there is anyway to emulate the Ruby style with
something like this:
http://us2.php.net/manual/en/function.func-get-args.php
Is there a way to get the parameters as an associative array? A
numerically indexed array is just as useless as the normal style of
passing arguments.
Navigation:
[Reply to this message]
|