- var_dump: documentation ( source)
<?php
class A
{
private $foo;
public function setFooA($value)
{
$this->foo = $value;
}
public function getFooA($value)
{
return $this->foo;
}
}
class B extends A
{
protected $foo;
public function setFooB($value)
{
$this->foo = $value;
}
public function getFooB($value)
{
return $this->foo;
}
}
$thing = new B;
$thing->setFooB('stuff');
var_dump($thing->getFooA());