- var_dump: documentation ( source)
<?php
class A
{
private $myPrivateProperty = 'foo';
public function doSomethingWithADifferentObject($otherObject)
{
var_dump($myPrivateProperty->foo);
}
}
$a1 = new A;
$a2 = new A;
$a1->doSomethingWithADifferentObject($a2);