- var_dump: documentation ( source)
<?php
class A{
function foo()
{
if(isset($this))
{
return true;
}
return false;
}
function bar()
{
return $this;
}
}
class B{
function bb()
{
$a = new A();
var_dump(A::bar());
var_dump($a->bar());
}
}
$a = new A;
var_dump(A::foo());
var_dump($a->foo());
$b = new B();
$b->bb();