©
本文档使用
php.cn手册 发布
(PHP 5)
ReflectionProperty::isProtected — Checks if property is protected
Checks whether the property is protected.
此函数没有参数。
TRUE
if the property is protected, FALSE
otherwise.
[#1] Ievgen Iefimenko the_boss at bk dot ru [2012-06-09 21:44:09]
<?php
class Classname{
private $variable;
}
$obj = new Classname;
$rp = new ReflectionProperty($obj,'variable');
echo $rp->isPrivate();
?>