PHP 7.0.0 RC 1 Released

ReflectionClass::getModifiers

(PHP 5)

ReflectionClass::getModifiersدریافت تغییردهنده

Description

public int ReflectionClass::getModifiers ( void )

Warning

This function is currently not documented; only its argument list is available.

Parameters

This function has no parameters.

Return Values

See Also

add a note add a note

User Contributed Notes 1 note

up
0
Nicola Pietroluongo
6 months ago
It's the amount of memory allocation in bit.
By default many systems allocate 1048576 bit (1 Megabit).

/* Example 1 */

class Test {}
$classTest = new Test();
$reflectionClass = new \ReflectionClass('Test');
$classModifiers = $reflectionClass->getModifiers();
var_export($classModifiers);

//output
1048576

/* Example 2 */

class Test {}
//the constructor is missing
$reflectionClass = new \ReflectionClass('Test');
$classModifiers = $reflectionClass->getModifiers();
var_export($classModifiers);

//output
0
To Top