- var_dump: documentation ( source)
<?php
class A {
private $a;
public function __construct(string $a)
{
$this->a = $a;
}
public function doStuff() {
var_dump(isset($this->a), isset($a));
echo '$this->a holds the value of : ' . $this->a . PHP_EOL;
echo '$a holds the value of : ' . $a . PHP_EOL;
}
}
$aObject = new A("helloWorld");
$aObject->doStuff();