PHP OPcache优化级别-它们是什么? [英] PHP OPcache optimization levels - what are they?

查看:268
本文介绍了PHP OPcache优化级别-它们是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个 opcache.optimization_level php.ini指示.这是一个位掩码,默认为0xffffffff-因此默认情况下,OPcache会进行所有优化.

There is an opcache.optimization_level php.ini directive. It is a bitmask a defaults to 0xffffffff - so by default OPcache does all the optimizations.

OPcache会进行哪种优化?字节码传递了什么?

What kind of optimizations does OPcache do? What passes on bytecode are done?

后续问题:OPcache是​​否可以很好地优化代码模式?例如,HHVM可以跳过仅包含类/函数声明的文件的执行,而仅填充类/函数表.

Follow-up question: is there a code pattern that OPcache can optimise very well? For example, HHVM can skip execution of files that contain only class/function declarations and it just fills class/function tables.

推荐答案

opcache.optimization_level的位对应于:

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆