PEAR::registerShutdownFunc()

PEAR::registerShutdownFunc() --  スタティッククラスのシャットダウン関数を設定する (パッケージ開発者用)

概要

require_once 'PEAR.php';

void PEAR::registerShutdownFunc (array $func [, array $var = array()])

説明

PHP インタプリタが終了する前に、指定された関数がコールされます。

パラメータ

例 31-1registerShutdownFunc() の使用


<?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
}

}

?>