+1.866.605.2484
Free Web Hosting

Zend Optimizer Tutorial

Zend Optimizer is available on SiteGround Servers!

What is Zend Optimizer?

Zend Optimizer is a free application that runs the files encoded by the Zend Guard. Zend Optimizer greatly enhances the performance of PHP applications. Generally this is the main use of the Zend Optimizer software.

The Zend Optimizer goes over the code generated by the standard Zend run-time compiler and optimizes it for faster execution. In addition, the Zend Optimizer enables PHP to load and execute files encoded by using Zend Guard. The standard Zend run-time compiler used by PHP is indeed extremely fast, generating code that is usually 2 to 10 times faster. But an application that uses the Zend Optimizer, most commonly executes the scripts another 40% to 100% faster.

System requirements:

Supported Operating Systems, Platforms and OS versions:

  • Linux x86
  • Linux x86-64
  • Linux Power
  • Solaris Sparc 8, 9, 10
  • Solaris x86 9, 10
  • FreeBSD x86 5.x, 6.x
  • Windows x86 2000, XP, 2003
  • OS X Mac Power
  • AIX pSeries 5

Supported Web Servers:

  • Apache 1.3.x
  • Apache 2.0.x (Prefork mode only)
  • IIS 5, 6

PHP Compatibility

Supported PHP versions:

  • 4.2.x up to 4.4.x
  • 5.0.x, 5.1.x

OS X Mac supports PHP versions:

  • 4.3.x up through 5.1.x

Zend Guard Compatibility:

Files encoded with the Zend Guard must be compiled with a compatible version of Zend Guard. When in doubt always use the latest version of Zend Optimizer. If the versions of Zend Guard and Zend Optimizer are incompatible, the Optimizer will fail to run encoded files and will register an error message.

Interesting details:

Always bear in mind that Zend Optimizer will *not* run if the following PHP settings are enabled:

1. Thread Safety
2. Enable Versioning

To ensure that Zend Optimizer is properly running create a .php file with the following code:

<?php
phpinfo();
?>

Once this is done access the file via web browser. The part associated with Zend Optimizer will look like this:

This program makes use of the Zend scripting language engine: Zend Engine vX.Y.Z, Copyright (c) 1998-2006 by Zend Technologies Ltd. with Zend Optimizer vX.Y.Z, Copyright (c) 1998-2006 by Zend Technologies Ltd.

The downloaded package includes an "Accelerated by Zend Optimizer" icon which you can post on your site, thus letting users to know you are running Zend Optimizer.

The Zend Optimizer is capable of performing around 20 different optimizations, some of which are quite complex. One of the simpler optimizations that the Zend Optimizer does is to change post-incrementing to pre-incrementing, where possible, since pre-incrementing is the faster operation of the two. You can adjust your Zend Optimizer to perform only the desired optimizations. Each optimization can be turned on or off by setting the corresponding option. Currently the latest Zend Optimizer versions come with some of the most complex optimization options disabled as it is considered that way for best performance.



PHP Hosting
(c) Copyright 2006 SiteGround Web Hosting Provider. All rights reserved