Free PHP accelerated software Zend Optimizer performance test

Source: Internet
Author: User
Tags current time execution explode php script zend

We all know Zend Optimizer This tool is Zend provides a free PHP acceleration software, the official said that this tool can make PHP performance improvement of 30%-40%, I recently personally tried, the Zend optimizer specifically done a test, Discovery can actually improve PHP efficiency. Here is the whole process of testing.

The PHP script used in the test is as follows:

?

To get the current time before the loop starts

$pagestartime =microtime ();

Here we start a loop, just do a simple self increment operation.

$k = 1;

For ($i =1 $i <1000000; $i + +) {

$k + +;

}

At the end of the loop, get the current time

$pageendtime =microtime ();

Calculate the time used for recycling

$starttime =explode ("", $pagestartime);

$endtime =explode ("", $pageendtime);

$totaltime = $endtime [0]-$starttime [0]+ $endtime [1]-$starttime [1];

$timecost =sprintf ("%s", $totaltime);

Print out when to recycle

echo "Times: $timecost";

?>

Test One:

Use Access in the browser, respectively, when Zend Optimizer is enabled and closed: http://localhost/test_zend_opt.php

Enable Zend Optimizer, the execution time for this script is: times:0.117239952087

Close Zend Optimizer, the execution time of the script is: times:0.129501104355

Come to the conclusion that:

When the PHP script is executed, the performance is increased by 9.47% after enabling Zend Optimizer

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.