- property_exists: documentation ( source)
- var_dump: documentation ( source)
<?php
class A{
protected $stuff;
function check(){
var_dump(property_exists($this, 'stuff'));
var_dump($this->stuff);
}
}
$a = new A;
unset($a->stuff);
$a->check();