array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'function.wincache-ocache-meminfo.php', 1 => 'wincache_ocache_meminfo', ), 'up' => array ( 0 => 'ref.wincache.php', 1 => 'WinCache 函数', ), 'prev' => array ( 0 => 'function.wincache-ocache-fileinfo.php', 1 => 'wincache_ocache_fileinfo', ), 'next' => array ( 0 => 'function.wincache-refresh-if-changed.php', 1 => 'wincache_refresh_if_changed', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/wincache/functions/wincache-ocache-meminfo.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL wincache >= 1.0.0)
wincache_ocache_meminfo — Retrieves information about opcode cache memory usage
此函数没有参数。
Array of meta data about opcode cache memory usage 或者在失败时返回 false
The array returned by this function contains the following elements:
memory_total
- amount of memory in bytes allocated for the opcode cache
memory_free
- amount of free memory in bytes available for the opcode cache
num_used_blks
- number of memory blocks used by the opcode cache
num_free_blks
- number of free memory blocks available for the opcode cache
memory_overhead
- amount of memory in bytes used for the opcode cache internal structures
该函数已在 PHP 7.0.0 中 移除。
示例 #1 A wincache_ocache_meminfo() example
<pre>
<?php
print_r(wincache_ocache_meminfo());
?>
</pre>
以上示例会输出:
Array ( [memory_total] => 134217728 [memory_free] => 112106972 [num_used_blks] => 15469 [num_free_blks] => 4 [memory_overhead] => 247600 )