Skip to content

Commit e9ff1fa

Browse files
committed
Revert "merge PR #2290: enable opcache in CLI in 7.1+"
This reverts commit 71fe529. Without the file cache (which is not enabled by default), this has non-trivial impact on the startup time. It also significantly increases the baseline memory usage of PHP on CLI.
1 parent 48598a2 commit e9ff1fa

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

NEWS

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ PHP NEWS
1818
- Opcache:
1919
. Fixed bug #74663 (Segfault with opcache.memory_protect and
2020
validate_timestamp). (Laruence)
21+
. Revert opcache.enable_cli to default disabled. (Nikita)
2122

2223
- Reflection:
2324
. Fixed bug #74673 (Segfault when cast Reflection object to string with

ext/opcache/zend_accelerator_module.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ ZEND_INI_BEGIN()
304304
STD_PHP_INI_ENTRY("opcache.optimization_level" , DEFAULT_OPTIMIZATION_LEVEL , PHP_INI_SYSTEM, OnUpdateLong, accel_directives.optimization_level, zend_accel_globals, accel_globals)
305305
STD_PHP_INI_ENTRY("opcache.opt_debug_level" , "0" , PHP_INI_SYSTEM, OnUpdateLong, accel_directives.opt_debug_level, zend_accel_globals, accel_globals)
306306
STD_PHP_INI_BOOLEAN("opcache.enable_file_override" , "0" , PHP_INI_SYSTEM, OnUpdateBool, accel_directives.file_override_enabled, zend_accel_globals, accel_globals)
307-
STD_PHP_INI_BOOLEAN("opcache.enable_cli" , "1" , PHP_INI_SYSTEM, OnUpdateBool, accel_directives.enable_cli, zend_accel_globals, accel_globals)
307+
STD_PHP_INI_BOOLEAN("opcache.enable_cli" , "0" , PHP_INI_SYSTEM, OnUpdateBool, accel_directives.enable_cli, zend_accel_globals, accel_globals)
308308
STD_PHP_INI_ENTRY("opcache.error_log" , "" , PHP_INI_SYSTEM, OnUpdateString, accel_directives.error_log, zend_accel_globals, accel_globals)
309309
STD_PHP_INI_ENTRY("opcache.restrict_api" , "" , PHP_INI_SYSTEM, OnUpdateString, accel_directives.restrict_api, zend_accel_globals, accel_globals)
310310

php.ini-development

+1-1
Original file line numberDiff line numberDiff line change
@@ -1782,7 +1782,7 @@ ldap.max_links = -1
17821782
;opcache.enable=1
17831783

17841784
; Determines if Zend OPCache is enabled for the CLI version of PHP
1785-
;opcache.enable_cli=1
1785+
;opcache.enable_cli=0
17861786

17871787
; The OPcache shared memory storage size.
17881788
;opcache.memory_consumption=128

php.ini-production

+1-1
Original file line numberDiff line numberDiff line change
@@ -1782,7 +1782,7 @@ ldap.max_links = -1
17821782
;opcache.enable=1
17831783

17841784
; Determines if Zend OPCache is enabled for the CLI version of PHP
1785-
;opcache.enable_cli=1
1785+
;opcache.enable_cli=0
17861786

17871787
; The OPcache shared memory storage size.
17881788
;opcache.memory_consumption=128

0 commit comments

Comments
 (0)