Code: Select all
[color=#000080]register_shutdown_function([/color][color=#800000]array($this, 'close')[/color][color=#000080]);[/color]Code: Select all
[color=#800000]array($this, 'close')[/color]Moderator: General Moderators
Code: Select all
[color=#000080]register_shutdown_function([/color][color=#800000]array($this, 'close')[/color][color=#000080]);[/color]Code: Select all
[color=#800000]array($this, 'close')[/color]Code: Select all
class foobar()
{
public function __construct()
{
register_shutdown_function(array($this, 'close'));
}
public function close()
{
//will be called later on scripts end
}
}Code: Select all
$myobject = new foobar();
register_shutdown_function(array($myobject, 'close'));