Thursday, 10 September 2015

Zend Server Optimizer+ cache problems

If Zend Optimizer is caching your files and new changes are not reflected when the code is running, in PHP you can call:

accelerator_reset()

This will clear the Optimizer cache.
http://files.zend.com/help/Zend-Server-5/zend_optimizer+_-_php_api.htm

Debugging PHP constants

Handy tip:
If you'r bodded down in old legacy PHP code and you need to know what constants are defined at any point during execution, simply call:

get_defined_constants(true)

You can either add this to Zend Debugger as an expression or error_log with print_r it.