|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2015-08-25 12:20 UTC] viktor at szepe dot net
Description:
------------
opcache_get_status() returns false in shutdown but not before it.
PHP 7.0.0-dev (cli) (built: Aug 17 2015 19:10:40)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0-dev, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
Test script:
---------------
function o1_opcache() {
var_export( opcache_get_status() ); // false
}
register_shutdown_function( 'o1_opcache' );
Expected result:
----------------
OPcache status
Actual result:
--------------
false
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 02:00:01 2025 UTC |
It is very strange: after disabling opcache.restrict_api it is OK. But opcache.restrict_api was "/home/wp/website/" and the only script is: 'scripts' => array ( '/home/wp/website/html/opcache-status-in-shutdown.php' => array ( 'full_path' => '/home/wp/website/html/opcache-status-in-shutdown.php', 'hits' => 0, 'memory_consumption' => 1288, 'last_used' => 'Wed Aug 26 08:54:46 2015', 'last_used_timestamp' => 1440572086, 'timestamp' => 0, ), How should I use opcache.restrict_api to get OPcache status?