ZF-8842: Reflection call could be avoided
Description
Zend_Serializer::factory() makes a call to Reflection to make a check for implemented interfaces of the adapter class.
Reflection calls are known to be PHP greedy, and this one could be avoided.
2 solutions suggested : - Create an instance of the adapter class, then use instanceof operator to check if it implements an interface - use PHP::class_implements() which avoid any object instanciation but require an in_array() search.
Comments
Posted by julien PAULI (doctorrock83) on 2010-01-16T13:54:40.000+0000
A fix is at svn 20343
Posted by Marc Bennewitz (private) (mabe) on 2010-01-16T16:48:45.000+0000
On creating an instance it will execute code (constructor) of the unchecked class.
Posted by Marc Bennewitz (private) (mabe) on 2010-01-16T17:01:53.000+0000
fixed in r20347 & on 1.10 branch in r20348