Skip to content

Commit 3eb057c

Browse files
committed
Merge branch 'PHP-7.2' into PHP-7.3
2 parents 3f73916 + 768ad70 commit 3eb057c

File tree

3 files changed

+33
-2
lines changed

3 files changed

+33
-2
lines changed

NEWS

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ PHP NEWS
77
. Fixed bug #78212 (Segfault in built-in webserver). (cmb)
88

99
- Date:
10-
. Fixed #69044 (discrepency between time and microtime). (krakjoe)
10+
. Fixed bug #69044 (discrepency between time and microtime). (krakjoe)
1111
. Updated timelib to 2018.02. (Derick)
1212

1313
- Libxml:
@@ -30,13 +30,15 @@ PHP NEWS
3030
. Fixed bug #78202 (Opcache stats for cache hits are capped at 32bit NUM).
3131
(cmb)
3232
. Fixed bug #78271 (Invalid result of if-else). (Nikita)
33+
. Fixed bug #78291 (opcache_get_configuration doesn't list all directives).
34+
(Andrew Collington)
3335

3436
- PCRE:
3537
. Fixed bug #78197 (PCRE2 version check in configure fails for "##.##-xxx"
3638
version strings). (pgnet, Peter Kokot)
3739

3840
- PDO_Sqlite:
39-
. Fixed #78192 (SegFault when reuse statement after schema has changed).
41+
. Fixed bug #78192 (SegFault when reuse statement after schema has changed).
4042
(Vincent Quatrevieux)
4143

4244
- SQLite:
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
--TEST--
2+
Test that the directives listed with `opcache_get_configuration` include all those from the ini settings.
3+
--INI--
4+
opcache.enable=1
5+
opcache.enable_cli=1
6+
opcache.opt_debug_level=0
7+
--SKIPIF--
8+
<?php require_once('skipif.inc'); ?>
9+
--FILE--
10+
<?php
11+
$opts = opcache_get_configuration()['directives'];
12+
$inis = ini_get_all('zend opcache');
13+
var_dump(array_diff_key($inis, $opts));
14+
?>
15+
--EXPECT--
16+
array(0) {
17+
}

ext/opcache/zend_accelerator_module.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,13 +725,25 @@ static ZEND_FUNCTION(opcache_get_configuration)
725725

726726
#ifndef ZEND_WIN32
727727
add_assoc_string(&directives, "opcache.lockfile_path", STRING_NOT_NULL(ZCG(accel_directives).lockfile_path));
728+
#else
729+
add_assoc_string(&directives, "opcache.mmap_base", STRING_NOT_NULL(ZCG(accel_directives).mmap_base));
728730
#endif
729731

730732
#ifdef HAVE_OPCACHE_FILE_CACHE
731733
add_assoc_string(&directives, "opcache.file_cache", ZCG(accel_directives).file_cache ? ZCG(accel_directives).file_cache : "");
732734
add_assoc_bool(&directives, "opcache.file_cache_only", ZCG(accel_directives).file_cache_only);
733735
add_assoc_bool(&directives, "opcache.file_cache_consistency_checks", ZCG(accel_directives).file_cache_consistency_checks);
734736
#endif
737+
#if ENABLE_FILE_CACHE_FALLBACK
738+
add_assoc_bool(&directives, "opcache.file_cache_fallback", ZCG(accel_directives).file_cache_fallback);
739+
#endif
740+
741+
add_assoc_long(&directives, "opcache.file_update_protection", ZCG(accel_directives).file_update_protection);
742+
add_assoc_long(&directives, "opcache.opt_debug_level", ZCG(accel_directives).opt_debug_level);
743+
add_assoc_string(&directives, "opcache.restrict_api", STRING_NOT_NULL(ZCG(accel_directives).restrict_api));
744+
#ifdef HAVE_HUGE_CODE_PAGES
745+
add_assoc_bool(&directives, "opcache.huge_code_pages", ZCG(accel_directives).huge_code_pages);
746+
#endif
735747

736748
add_assoc_zval(return_value, "directives", &directives);
737749

0 commit comments

Comments
 (0)