[development] performance foo

Neil Drumm drumm at delocalizedham.com
Wed Dec 14 20:32:27 UTC 2005


Chris Johnson wrote:
> Interesting idea.  So I rewrote object2array() and better() like this:
> 
> function object2array($object) {
>     return get_object_vars($object);
> }
> 
> function better($object) {
>     return (array) $object;
> }

Why do we even need these one-line functions? Can't the calling code 
just do the casting?

-Neil

-- 
Neil Drumm
http://delocalizedham.com/


More information about the development mailing list