PEAR::registerShutdownFunc()
PEAR::registerShutdownFunc() –
スタティッククラスのシャットダウン関数を設定する (package developer related)
Synopsis
require_once 'PEAR.php';
void PEAR::registerShutdownFunc (
array $func
,
array $var = array()
)
Description
PHP インタプリタが終了する前に、指定された関数がコールされます。
Example
registerShutdownFunc() の使用
<?php
require_once 'PEAR.php';
class myClass {
function myClass()
{
PEAR::registerShutdownFunc(array('myClass', 'shutdown'),
array('param1', 'param2'));
}
function shutdown( $param1, $param2)
{
// do something before we will die
}
}
?>