BobRay Reply #1, 2 years, 1 month ago
I've been trying hard, but I can't see why this common code in MODx uses both tests:
It would seem that an instance of an object class would have to be an object so the is_object() test seems unnecessary.
Does this code work in PHP4?
Is it a speed thing? I imagine that most of the time the object passes the test so you'd have a net loss in speed by using both tests.

if (is_object($object) && $object instanceof xPDOObject) {It would seem that an instance of an object class would have to be an object so the is_object() test seems unnecessary.
Does this code work in PHP4?
Is it a speed thing? I imagine that most of the time the object passes the test so you'd have a net loss in speed by using both tests.
