In a function, how can I find out if it's been called from an output buffering callback (not necessarily directly)?
function foo() {
if (magic here ????)
$log->write("foo:Callback")
else
$log->write("foo:Normal")
}
function calls_foo() {
...stuff
foo();
}
calls_foo() // should log foo:Normal
ob_start('calls_foo')
...stuff
// should log foo:Callback at the end of the script