Home > Backend Development > PHP Tutorial > About Zend Optimizer_PHP Tutorial

About Zend Optimizer_PHP Tutorial

WBOY
Release: 2016-07-13 17:23:08
Original
861 people have browsed it

Zend Optimizer (hereinafter 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, PHP programs that use ZO are executed 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:
- Versions other than PHP 4.0.0: are not supported
- Supports both CGI and Apache module methods
- On Windows Under the circumstances, 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 debugging options - otherwise ZO will not work: add the --disable-debug option in the configuration


2 Copy ZendOptimizer.so file to your machine, usually under: /usr/local/Zend/lib
3 Add the following two lines to the php.ini file, do not include any spaces:
zend_optimizer.optimization_level=7
zend_extension="/usr/local/Zend/lib/ZendOptimizer.so"
4 Restart the Apache server
-WINDOWS
1 Download the WINDOWS version of PHP 4.0 from http://www.php.net. 0, this version does not contain debugging features.
2 Copy the ZendOptimizer.dll file to your machine, usually placed 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 If necessary, restart the WEB server
Zend Optmizer FAQ
Q: What is Zend Optimizer; What is it for?
Answer: ZO carefully checks the code generated by the running compiler, analyzes and optimizes it to make it run faster.
Question: Why use ZO? Isn’t PHP4 fast enough?
Answer: 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%.
Question: Where is ZO installed in the PHP4 software?
Answer: ZO is located in the ZEND engine of PHP4, between the running compiler and the final executor.
Question: 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/532272.htmlTechArticleZend Optimizer (hereinafter referred to as ZO) uses code optimization methods to improve the execution speed of PHP 4.0 applications. The principle of implementation is to control the run-time compiler (Run-Time C...
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template