Zend Optimizer is nice product, but I can’t make it work with PHP’s Reflection. Reflection is very good functionality which allows script to read and extract information from it-self’s source code. For example, Zend_XmlRpc_Server component checks functions signatures (which are phpdoc comments) to determine if given parameter(s) is valid type, etc.
I have been using Zend Framework for some time now, and found that only possible way to use XmlRpc Server package is to delete all functions signatures checking. My production server has Zend Optimizer installed and it just breaks Reflection functionality.
For tests I created simple reflection example:
/** * My Class */ class test { } $oClassReflect = new ReflectionClass("Test"); print $oClassReflect->getDocComment();
First time script outputs:
/** * My Class */
Next times there is no output at all – all comments are gone (in Optimizer’s cache). I still can get methods of class (source code is not gone), but I cannot use comments to mark params/return types and later use them to validate I/O.
I don’t know yet if it’s a problem with my production server, but Zend manuals are not very clear and I can’t find any information about comments stripping issue. Has anyone had similar problems?







