- property_exists: documentation ( source)
- var_dump: documentation ( source)
<?php
class P {
public function test_prop($prop) { return property_exists(__CLASS__, $prop); }
}
class Child extends P {
private $prop1;
}
$child = new Child();
var_dump($child->test_prop('prop1')); //true, as of PHP 5.3.0