- printf: documentation ( source)
<?php
class C {
public function __destruct() {
printf('%s destroyed', __CLASS__);
}
}
function f(C $c)
{
echo __FUNCTION__;
}
function g(C $c)
{
unset($c);
echo __FUNCTION__;
}
f(new C());
g(new C());