Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
126 changes: 126 additions & 0 deletions reference/opcache/functions/opcache-get-status.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,132 @@
be returned.
</para>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>PHP 8.3.0</entry>
<entry>
<code>opcache_get_status()['scripts'][n]['revalidate']</code>
now contains a Unix timestamp of when the next revalidation of the
scripts timestamp is due, as dictated by the
<link linkend="ini.opcache.revalidate-freq"><literal>opcache.revalidate_freq</literal></link>
INI directive.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>

<refsect1 role="examples">
&reftitle.examples;
<example>
<title>A <function>opcache_get_status</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
var_dump(opcache_get_status());
?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
array(9) {
'opcache_enabled' =>
bool(true)
'cache_full' =>
bool(false)
'restart_pending' =>
bool(false)
'restart_in_progress' =>
bool(false)
'memory_usage' =>
array(4) {
'used_memory' =>
int(9167936)
'free_memory' =>
int(125049792)
'wasted_memory' =>
int(0)
'current_wasted_percentage' =>
double(0)
}
'interned_strings_usage' =>
array(4) {
'buffer_size' =>
int(8388608)
'used_memory' =>
int(2593616)
'free_memory' =>
int(5794992)
'number_of_strings' =>
int(10358)
}
'opcache_statistics' =>
array(13) {
'num_cached_scripts' =>
int(0)
'num_cached_keys' =>
int(0)
'max_cached_keys' =>
int(16229)
'hits' =>
int(0)
'start_time' =>
int(1733310010)
'last_restart_time' =>
int(0)
'oom_restarts' =>
int(0)
'hash_restarts' =>
int(0)
'manual_restarts' =>
int(0)
'misses' =>
int(0)
'blacklist_misses' =>
int(0)
'blacklist_miss_ratio' =>
double(0)
'opcache_hit_rate' =>
double(0)
}
'scripts' =>
array(0) {
}
'jit' =>
array(7) {
'enabled' =>
bool(false)
'on' =>
bool(false)
'kind' =>
int(5)
'opt_level' =>
int(4)
'opt_flags' =>
int(6)
'buffer_size' =>
int(0)
'buffer_free' =>
int(0)
}
}
]]>
</screen>
</example>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
Expand Down