1、opcache開啓方法
a:打開php.ini,找到[opcache],將下面一段拷入
; dll地址
zend_extension=php_opcache.dll
; 開關打開
opcache.enable=1
; 開啓CLI
opcache.enable_cli=1
; 可用內存, 酌情而定, 單位爲:Mb
opcache.memory_consumption=528
; Zend Optimizer + 暫存池中字符串的佔內存總量.(單位:MB)
opcache.interned_strings_buffer=8
; 對多緩存文件限制, 命中率不到 100% 的話, 可以試着提高這個值
opcache.max_accelerated_files=10000
; Opcache 會在一定時間內去檢查文件的修改時間, 這裏設置檢查的時間週期, 默認爲 2, 定位爲秒
opcache.revalidate_freq=1
; 打開快速關閉, 打開這個在PHP Request Shutdown的時候回收內存的速度會提高
opcache.fast_shutdown=1
b:重啓服務
2、xdebug開啓方法
a:打開php.ini,找到[opcache],將下面一段拷入
xdebug.remote_enable = on
xdebug.profiler_enable = on
xdebug.profiler_enable_trigger = on
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "d:/wamp/tmp"
xdebug.show_local_vars=0
xdebug.max_nesting_level=256
b:重啓服務