Home  >  Article  >  Backend Development  >  About ZendOptimizer_PHP Tutorial

About ZendOptimizer_PHP Tutorial

WBOY
WBOYOriginal
2016-07-13 17:25:46714browse

About Zend Optimizer
Hunte May 23, 2000

Email it to me and I will talk about my views Previous articleNext article


Zend Optimizer (below ZO (referred to as ZO) uses code optimization methods to improve the execution speed of PHP 4.0 applications. The principle of implementation is to optimize the code generated by the run-time compiler (Run-Time Compiler) before being finally executed.

Optimization can improve your profitability

Generally, executing PHP programs using ZO is 40% to 100% faster than those without. This means website visitors can browse the web faster, get more done, and create better customer satisfaction. Faster response also means saving on hardware investment and enhancing the services provided by the website. Therefore, using ZO is equivalent to improving the profitability of e-commerce.

ZO can bring many benefits to PHP users, especially those who operate websites. Running PHP programs quickly can significantly reduce the CPU load on the server and can cut in half the response time, which is the time between when a visitor clicks a link and when the server starts reading the page.

System Requirements

The current version of ZO (Beta 4) can only run under PHP 4.0.

The operating system requirements are as follows:
-x86 Linux system based on glibc2.1 (Red Hat 6.1, Mandrake 7.0, Slackware 7.0 and SuSE 6.1)
-x86 Linux system based on glibc2 ( Red Hat 5.2, SuSE 6.1)
- libc5 based x86 Linux system (Slackware 4.0, Debian 1.3.1r8)
- Sparc Solaris 2.6, 7 and 8
- FreeBSD 3.4 and 4.0
- Windows NT 4.0 (excluding other versions of Windows)

The requirements for PHP are as follows:
- PHP 4.0.0: Other versions are not supported
- Supports both CGI mode and Apache module mode
- Under Windows, PHP must: 1) be a ready-made WIN32 executable version downloaded from http://www.php.net; 2) compile it yourself with the "Release_Ts" (Release Thread Safe) option.



Installation process

-UNIX
1 Compile PHP, do not add the debug option - otherwise ZO will not work: add the --disable-debug option in the configuration
2 Copy the ZendOptimizer.so file to your machine, usually under: /usr/local/Zend/lib
3 Add the following two lines to the php.ini file, without any spaces:
zend_optimizer. optimization_level=7
zend_extension="/usr/local/Zend/lib/ZendOptimizer.so"
4 Restart the Apache server

-WINDOWS
1 From http://www.php .net download the WINDOWS version of PHP 4.0.0. This version does not include debugging features.
2 Copy the ZendOptimizer.dll file to your machine, usually under: C:Program Files endlib
3 Add the following two lines to the php.ini file, do not include any spaces:
zend_optimizer. optimization_level=7
zend_extension_ts="C:Program Files endlib endOptimizer.dll"
4 Restart the WEB server if necessary

Zend Optmizer FAQ

Ask: What is Zend Optimizer; what is it used for?
Answer: ZO carefully checks the code generated by the running compiler, analyzes and optimizes it to make it run faster.

Q: Why use ZO? Isn’t PHP4 fast enough?
A: Indeed, the standard running compiler for PHP4 is fast enough - 2-10 times faster than PHP3 under the same circumstances. But the execution speed of PHP programs using ZO will be accelerated by 40% to 100%.

Q: Where is ZO installed in the PHP4 software?
A: ZO is located in the ZEND engine of PHP4, between the running compiler and the final executor.

Q: Will the final release version of ZO be paid?
Answer: No. The final version of ZO will continue to be released as free software. ZEND Technologies does not plan to charge for any version of ZO.

Q: How do developers know if ZO is running?
Answer: Just use the PHP function phpinfo() to detect it, as shown below:
phpinfo();
?>
The results displayed about ZO The part looks like this:
This program makes use of the Zend scripting language engine:
Zend Engine v1.0, Copyright (c) 1998-2000 Zend Technologies Ltd.
with Zend Optimizer v0.98, Copyright (c) 1998-2000 by Zend Technologies

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/532017.htmlTechArticleAbout Zend Optimizer Hunte May 23, 2000 Email it to me and I will talk about my viewsPrevious Next article Zend Optimizer (hereinafter referred to as ZO) uses code optimization methods to improve PHP 4.0 applications...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn