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