3v4l.org

run code in 300+ PHP versions simultaneously
<?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

preferences:
29.82 ms | 402 KiB | 5 Q