- printf: documentation ( source)
<?php
class Test
{
private $baz = 1;
public static function foo()
{
echo "foo\n";
}
public function bar()
{
echo "bar\n";
$this->foo();
$this::foo();
self::foo();
self::baz();
}
public function baz()
{
printf("baz = %d\n", $this->baz);
}
}
$test = new Test;
$test->bar();