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