Skip to content

Commit e512305

Browse files
committed
Remove opcache.inherited_hack
This ini directive has already been ignored since PHP 5.3.
1 parent 8cced30 commit e512305

File tree

6 files changed

+4
-18
lines changed

6 files changed

+4
-18
lines changed

Diff for: UPGRADING

+4
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,10 @@ PGSQL:
160160
- birdstep.max_links
161161
. This INI directive has been removed.
162162

163+
- opcache.inherited_hack
164+
. This INI directive has been removed. The value has already been ignored
165+
since PHP 5.3.0.
166+
163167
========================================
164168
12. Windows Support
165169
========================================

Diff for: ext/opcache/README

-13
Original file line numberDiff line numberDiff line change
@@ -143,19 +143,6 @@ opcache.optimization_level (default "0xffffffff")
143143
A bitmask, where each bit enables or disables the appropriate OPcache
144144
passes
145145

146-
opcache.inherited_hack (default "1")
147-
Enable this hack as a workaround for "Cannot redeclare class" errors.
148-
The OPcache stores the places where DECLARE_CLASS opcodes use
149-
inheritance (These are the only opcodes that can be executed by PHP,
150-
but which may not be executed because the parent class is missing due to
151-
optimization). When the file is loaded, OPcache tries to bind the
152-
inherited classes by using the current environment. The problem with this
153-
scenario is that, while the DECLARE_CLASS opcode may not be needed for the
154-
current script, if the script requires that the opcode at least be defined,
155-
it may not run. The default for this directive is disabled, which means
156-
that optimization is active. In php-5.3 and above this hack is not needed
157-
anymore and this setting has no effect.
158-
159146
opcache.dups_fix (default "0")
160147
Enable this hack as a workaround for "Cannot redeclare class" errors.
161148

Diff for: ext/opcache/ZendAccelerator.h

-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ typedef struct _zend_accel_directives {
177177
zend_bool save_comments;
178178
zend_bool protect_memory;
179179
zend_bool file_override_enabled;
180-
zend_bool inherited_hack;
181180
zend_bool enable_cli;
182181
zend_bool validate_permission;
183182
#ifndef ZEND_WIN32

Diff for: ext/opcache/zend_accelerator_module.c

-2
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,6 @@ ZEND_INI_BEGIN()
280280
#ifndef ZEND_WIN32
281281
STD_PHP_INI_BOOLEAN("opcache.validate_root" , "0", PHP_INI_SYSTEM, OnUpdateBool, accel_directives.validate_root , zend_accel_globals, accel_globals)
282282
#endif
283-
STD_PHP_INI_BOOLEAN("opcache.inherited_hack" , "1", PHP_INI_SYSTEM, OnUpdateBool, accel_directives.inherited_hack , zend_accel_globals, accel_globals)
284283
STD_PHP_INI_BOOLEAN("opcache.dups_fix" , "0", PHP_INI_ALL , OnUpdateBool, accel_directives.ignore_dups , zend_accel_globals, accel_globals)
285284
STD_PHP_INI_BOOLEAN("opcache.revalidate_path" , "0", PHP_INI_ALL , OnUpdateBool, accel_directives.revalidate_path , zend_accel_globals, accel_globals)
286285

@@ -702,7 +701,6 @@ static ZEND_FUNCTION(opcache_get_configuration)
702701
#ifndef ZEND_WIN32
703702
add_assoc_bool(&directives, "opcache.validate_root", ZCG(accel_directives).validate_root);
704703
#endif
705-
add_assoc_bool(&directives, "opcache.inherited_hack", ZCG(accel_directives).inherited_hack);
706704
add_assoc_bool(&directives, "opcache.dups_fix", ZCG(accel_directives).ignore_dups);
707705
add_assoc_bool(&directives, "opcache.revalidate_path", ZCG(accel_directives).revalidate_path);
708706

Diff for: php.ini-development

-1
Original file line numberDiff line numberDiff line change
@@ -1784,7 +1784,6 @@ ldap.max_links = -1
17841784
; passes
17851785
;opcache.optimization_level=0xffffffff
17861786

1787-
;opcache.inherited_hack=1
17881787
;opcache.dups_fix=0
17891788

17901789
; The location of the OPcache blacklist file (wildcards allowed).

Diff for: php.ini-production

-1
Original file line numberDiff line numberDiff line change
@@ -1791,7 +1791,6 @@ ldap.max_links = -1
17911791
; passes
17921792
;opcache.optimization_level=0xffffffff
17931793

1794-
;opcache.inherited_hack=1
17951794
;opcache.dups_fix=0
17961795

17971796
; The location of the OPcache blacklist file (wildcards allowed).

0 commit comments

Comments
 (0)