[wp-hackers] Micro optimization - is_a() vs instanceof

Andrew Nacin wp at andrewnacin.com
Fri Jan 4 19:49:39 UTC 2013

On Fri, Jan 4, 2013 at 2:47 PM, Justas Butkus <jbutkus at time.ly> wrote:

> What a pity would be to curtail such a lunch, or at least a sensual impact
> of it, by doing a code replacement over it.
> There was no offence intended, and please find my patch attached, that
> would dismantle the cause of this issue, if applied, to alleviate my good
> intentions.
> The rationale behind my comment was just as good - to break the discussion
> about time consumption, while the change itself takes less time than
> thinking about it.

You should take a lunch to test your patch :-)

$a instanceof Some_Object
$a instanceof 'Some_Object'

More information about the wp-hackers mailing list