phpzend-optimizerzend-guard

What's the difference between Zend Optimizer and Zend Guard Loader? And what do they actually do?


I've got an app which requires Zend Optimizer to run because it's encoded somehow. Search for Zend Optimizer at official Zend site leades to Zend Guard Loader. What's the difference between these programs? Is there a way to install one of them via APT in Ubuntu or via PEAR or something? And does one of them exclude using php 5.5?


Solution

  • From the Zend Optimizer+ / Zend OPcache source README:

    The Zend OPcache provides faster PHP execution through opcode caching and optimization. It improves PHP performance by storing precompiled script bytecode in the shared memory. This eliminates the stages of reading code from the disk and compiling it on future access. In addition, it applies a few bytecode optimization patterns that make code execution faster.

    From the Zend Guard download page:

    Zend Guard Loader is a free application that runs the files encoded using Zend Guard and enhances the overall performance of your PHP applications.

    Zend Guard Loader only works with PHP 5.3 and 5.4. Prior to PHP 5.3 the runtime decoding was a part of the Zend Optimizer. Starting with PHP 5.3 the decoding capabilities were split out of the Optimizer and into the Guard Loader.

    Zend Guard does not appear to currently support PHP 5.5.