PEAR::registerShutdownFunc()

PEAR::registerShutdownFunc() – set a shutdown function for static classes (package developer related)

Synopsis

require_once 'PEAR.php';

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

Description

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

Parameter

  • array $func - the name of the class and of the function to ccore.

  • array $var - possible required function parameters. The parameters are handed over to the function in accordance with their succession of the array.

Example

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
}

}

?>
handle static properties (package developer related) (Previous) checks for a PEAR_Error object (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.