- var_dump: documentation ( source)
<?php
class testClass
{
private $test;
public function __construct($test)
{
$this->test = $test;
}
public function viewOthersTest($obj)
{
return $obj->test;
}
}
$obj1 = new testClass(1);
$obj2 = new testClass(2);
var_dump($obj1->viewOthersTest($obj2));