php7 performance test

WBOY
Release: 2016-07-28 08:29:14
Original
1312 people have browsed it

The execution code is as follows:

$start_time = microtime(true);

$a = array();

for($i=0;$i<90000;$i++){

$a[$i] = $i;

}

foreach($a as $i)

{

array_key_exists($i, $a);

in_array($i, $a);

}

$end_time = microtime(true);

echo "use time=".($end_time - $start_time);

in Time spent on php5.5.30:

use time=68.47440290451

It takes time to execute after installing php7 in the virtual machine

use time=8.4918169975281

The above has introduced the php7 performance test, including aspects of it. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!