- error_log: documentation ( source)
- ob_start: documentation ( source)
- register_shutdown_function: documentation ( source)
<?php
class B {
public function __destruct()
{
echo 'B';
error_log('B');
}
}
$b = new B;
register_shutdown_function(function(){ $b = new B; echo 'A';});
ob_start(function($buffer){ $b = new B; $buffer .= 'C'; return $buffer;});