- var_dump: documentation ( source)
<?php
class Foo
{
protected $foo;
public function getFoo()
{
return $this->foo;
}
}
class Bar extends Foo
{
public function __construct($foo)
{
$this->foo = $foo;
}
}
class FooBar
{
public $test = 'Hello World!';
}
$test = new Test();
$foo = new Foo($test);
$bar = new Bar($test);
var_dump($foo, $bar);