PEAR::registerShutdownFunc()

PEAR::registerShutdownFunc() -- set a shutdown function for static classes (bezogen auf Package-Entwickler)

Synopsis

require_once 'PEAR.php';

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

Beschreibung

The indicated function is called, before the PHP interpreter will be finished.

Parameter

Beispiel

Beispiel 31-1. Using 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
}

}

?>