- var_dump: documentation ( source)
<?php
class FooException extends Exception
{
public function __toString()
{
return Exception::__toString();
}
}
class Foo
{
public $prop = 'bar';
public function nonStatic() { return $this->prop; }
}
class Bar
{
public function anotherNonStatic() { return Foo::nonStatic(); }
}
$a = new FooException();
var_dump($a->__toString());
$b = new Bar();
var_dump($b->anotherNonStatic());