©
Dieses Dokument verwendet PHP-Handbuch für chinesische Websites Freigeben
(PHP 5)
ReflectionClass::getModifiers — 获取修饰符
返回这个类访问修饰符的位字段。
此函数没有参数。
返回 修饰符常量 的位掩码。
[#1] Nicola Pietroluongo [2015-02-26 01:17:07]
It's the amount of memory allocation in bit.
By default many systems allocate 1048576 bit (1 Megabit).
class Test {}
$classTest = new Test();
$reflectionClass = new \ReflectionClass('Test');
$classModifiers = $reflectionClass->getModifiers();
var_export($classModifiers);
//output
1048576
class Test {}
//the constructor is missing
$reflectionClass = new \ReflectionClass('Test');
$classModifiers = $reflectionClass->getModifiers();
var_export($classModifiers);
//output
0