diff --git a/UPGRADING b/UPGRADING index d08bc9f0fd9..e30f94ad8f6 100644 --- a/UPGRADING +++ b/UPGRADING @@ -108,6 +108,11 @@ PHP 8.3 UPGRADE NOTES - CLI . It is now possible to lint multiple files. +- Opcache + . opcache_get_status()['scripts'][n]['revalidate'] now contains a Unix + timestamp of when the next revalidation of the scripts timestamp is due, + dictated by the opcache.revalidate_freq INI directive. + - Posix . posix_getrlimit() now takes an optional $res parameter to allow fetching a single resource limit. diff --git a/ext/opcache/zend_accelerator_module.c b/ext/opcache/zend_accelerator_module.c index dc0fa961d74..2c0ad63b48f 100644 --- a/ext/opcache/zend_accelerator_module.c +++ b/ext/opcache/zend_accelerator_module.c @@ -616,6 +616,8 @@ static int accelerator_get_scripts(zval *return_value) timerclear(&exec_time); timerclear(&fetch_time); + add_assoc_long(&persistent_script_report, "revalidate", (zend_long)script->dynamic_members.revalidate); + zend_hash_update(Z_ARRVAL_P(return_value), cache_entry->key, &persistent_script_report); } }