- var_dump: documentation ( source)
- 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);
}
public function __call($method, $args)
{
echo "non static";
var_dump($method, $args);
}
public function __callStatic($method, $args)
{
echo " static";
var_dump($method, $args);
}
}
$test = new Test;
$test->bar();