- error_log: documentation ( source)
- ob_start: documentation ( source)
- register_shutdown_function: documentation ( source)
<?php
class B {
public $c;
public function __construct($c)
{
$this->c = $c;
}
public function __destruct()
{
echo 'B';
error_log('D' . $this->c);
}
}
$b = new B(1);
register_shutdown_function(function(){ $b = new B(2); echo 'A';});
ob_start(function($buffer){ $b = new B(3); $buffer .= 'C'; return $buffer;});