- var_export: documentation ( source)
<?php
class B {
protected $x = 'x';
function foo() {
return $this->x;
}
}
class C extends B {
protected $x = 'y';
function foo() {
return $this->x . parent::foo();
}
}
$c = new C;
var_export($c->foo());