Args?
May 12th, 2006 by rickSo, I found two very very sweet functions that have let me basically have polymorphism in php5… granted, I have to code it myself which sucks a bit, but at least the functionality is there.
func_num_args()
and
func_get_args()
may be the best functions every created. Throw func_get_arg() in there if you just need a single value, but you can use these 2(3) functions to have any of your functions accept any number of parameters and do different things based upon those values.
I R Happy Boy
Posted in Technology |
