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

6.5k views Asked by At

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?

2

There are 2 answers

2
user On BEST ANSWER

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.

0
Dirk Zaal On

Testing the execution of the Loader didn't show any speed- improvement to me..

Zend Loader scrambles a php file making it unreadable, and binds you to use the same PHP version number as when it was creating the encoded files, meaning you cannot upgrade from php 5.3 to 5.4 without re-encoding all your php files, which is a real pain if you do not have access to the original .php files.

packages that have files encoded are not anymore Open-source and make you dependent on their creator/developer, be aware that your server may not be upgraded unless your application is upgraded.