Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

uopz_flags(3) [php man page]

UOPZ_FLAGS(3)								 1							     UOPZ_FLAGS(3)

uopz_flags - Get or set flags on function or class

SYNOPSIS
int uopz_flags (string $class, string $function, int $flags) DESCRIPTION
int uopz_flags (string $function, int $flags) Get or set the flags on a class or function entry at runtime PARAMETERS
o $class - The name of a class o $function - The name of the function o $flags - A valid set of ZEND_ACC_ flags, ZEND_ACC_FETCH to read flags RETURN VALUES
If setting, returns old flags, else returns flags EXAMPLES
Example #1 uopz_flags(3) example <?php class Test { public function method() { return __CLASS__; } } $flags = uopz_flags("Test", "method", ZEND_ACC_FETCH); var_dump((bool) (uopz_flags("Test", "method", ZEND_ACC_FETCH) & ZEND_ACC_PRIVATE)); var_dump((bool) (uopz_flags("Test", "method", ZEND_ACC_FETCH) & ZEND_ACC_STATIC)); var_dump(uopz_flags("Test", "method", $flags|ZEND_ACC_STATIC|ZEND_ACC_PRIVATE)); var_dump((bool) (uopz_flags("Test", "method", ZEND_ACC_FETCH) & ZEND_ACC_PRIVATE)); var_dump((bool) (uopz_flags("Test", "method", ZEND_ACC_FETCH) & ZEND_ACC_STATIC)); ?> The above example will output something similar to: bool(false) bool(false) int(1234567890) bool(true) bool(true) PHP Documentation Group UOPZ_FLAGS(3)

Check Out this Related Man Page

CLASS_ALIAS(3)								 1							    CLASS_ALIAS(3)

class_alias - Creates an alias for a class

SYNOPSIS
bool class_alias TRUE (string $original, string $alias, [bool $autoload]) DESCRIPTION
Creates an alias named $alias based on the user defined class $original. The aliased class is exactly the same as the original class. PARAMETERS
o $original - The original class. o $alias - The alias name for the class. o $autoload - Whether to autoload if the original class is not found. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 class_alias(3) example <?php class foo { } class_alias('foo', 'bar'); $a = new foo; $b = new bar; // the objects are the same var_dump($a == $b, $a === $b); var_dump($a instanceof $b); // the classes are the same var_dump($a instanceof foo); var_dump($a instanceof bar); var_dump($b instanceof foo); var_dump($b instanceof bar); ?> The above example will output: bool(true) bool(false) bool(true) bool(true) bool(true) bool(true) bool(true) SEE ALSO
get_parent_class(3), is_subclass_of(3). PHP Documentation Group CLASS_ALIAS(3)
Man Page