xref: /php-src/ext/opcache/tests/bug79665.phpt (revision f8c9928e)
1--TEST--
2Bug #79665 (ini_get() and opcache_get_configuration() may be inconsistent)
3--EXTENSIONS--
4opcache
5--INI--
6opcache.max_wasted_percentage=60
7opcache.memory_consumption=7
8opcache.max_accelerated_files=10
9opcache.log_verbosity_level=2
10--FILE--
11<?php
12$config = opcache_get_configuration();
13var_dump(ini_get('opcache.max_wasted_percentage'));
14var_dump($config['directives']['opcache.max_wasted_percentage']);
15var_dump(ini_get('opcache.memory_consumption'));
16var_dump($config['directives']['opcache.memory_consumption']);
17var_dump(ini_get('opcache.max_accelerated_files'));
18var_dump($config['directives']['opcache.max_accelerated_files']);
19?>
20--EXPECTF--
21%s: Warning opcache.memory_consumption is set below the required 8MB.
22
23%s: Warning opcache.max_accelerated_files is set below the required minimum (200).
24
25%s: Warning opcache.max_wasted_percentage must be set between 1 and 50.
26
27string(1) "5"
28float(0.05)
29string(3) "128"
30int(134217728)
31string(5) "10000"
32int(10000)
33