Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug #78291 Missing opcache directives
New opcache directives have been added recently which are returned if using `ini_get_all('zend opcache')` but are not listed in the directives if using `opcache_get_configuration()`. This fix adds those missing directives as well as if `opcache.mmap_base` is used instead of `opcache.lockfile_path`. Also adds a test to ensure the directives match with both methods of fetching.
- Loading branch information
Showing
3 changed files
with
40 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--TEST-- | ||
Test that the directives listed with `opcache_get_configuration` include all those from the ini settings. | ||
--INI-- | ||
opcache.enable=1 | ||
opcache.enable_cli=1 | ||
opcache.opt_debug_level=0 | ||
--SKIPIF-- | ||
<?php require_once('skipif.inc'); ?> | ||
--FILE-- | ||
<?php | ||
$opts = opcache_get_configuration()['directives']; | ||
$inis = ini_get_all('zend opcache'); | ||
var_dump(array_diff_key($inis, $opts)); | ||
?> | ||
--EXPECT-- | ||
array(0) { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters