array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ja', ), 'this' => array ( 0 => 'function.gc-enabled.php', 1 => 'gc_enabled', ), 'up' => array ( 0 => 'ref.info.php', 1 => 'PHP オプション/情報 関数', ), 'prev' => array ( 0 => 'function.gc-enable.php', 1 => 'gc_enable', ), 'next' => array ( 0 => 'function.gc-mem-caches.php', 1 => 'gc_mem_caches', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'ja', 'path' => 'reference/info/functions/gc-enabled.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5 >= 5.3.0, PHP 7, PHP 8)
gc_enabled — 循環参照コレクタの状態を返す
この関数にはパラメータはありません。
例1 gc_enabled() の例
<?php
if(gc_enabled()) gc_collect_cycles();
?>