ReflectionClass::isFinal

(PHP 5, PHP 7) Checks if class is final public bool ReflectionClass::isFinal ( void ) Checks if a class is final. Returns: Returns TRUE on success or FALSE on failure. Examples: ReflectionClass::isFinal() example <?php class       TestClass { } final class TestFinalClass { } $normalClass = new ReflectionClass('TestCla

ReflectionClass::isCloneable

(PHP >= 5.4.0) Returns whether this class is cloneable public bool ReflectionClass::isCloneable ( void ) Returns whether this class is cloneable. Returns: Returns TRUE if the class is cloneable, FALSE otherwise. Examples: Basic usage of ReflectionClass::isCloneable() <?php class NotCloneable {     public $var1;     

ReflectionClass::isAnonymous

(PHP 7) Checks if class is anonymous public bool ReflectionClass::isAnonymous ( void ) Checks if a class is an anonymous class. Returns: Returns TRUE on success or FALSE on failure. Examples: ReflectionClass::isAnonymous() example <?php class TestClass {} $anonClass = new class {}; $normalClass = new ReflectionClass('

ReflectionClass::isAbstract

(PHP 5, PHP 7) Checks if class is abstract public bool ReflectionClass::isAbstract ( void ) Checks if the class is abstract. Returns: Returns TRUE on success or FALSE on failure. Examples: ReflectionClass::isAbstract() example <?php class          TestClass { } abstract class TestAbstractClass { } $testClass     = new

ReflectionClass::inNamespace

(PHP 5 >= 5.3.0, PHP 7) Checks if in namespace public bool ReflectionClass::inNamespace ( void ) Checks if this class is defined in a namespace. Returns: Returns TRUE on success or FALSE on failure. Examples: ReflectionClass::inNamespace() example <?php namespace A\B; class Foo { } $function = new \ReflectionClass

ReflectionClass::implementsInterface

(PHP 5, PHP 7) Implements interface public bool ReflectionClass::implementsInterface ( string $interface ) Checks whether it implements an interface. Parameters: interface The interface name. Returns: Returns TRUE on success or FALSE on failure. See also: Refle

ReflectionClass::hasProperty

(PHP 5 >= 5.1.0, PHP 7) Checks if property is defined public bool ReflectionClass::hasProperty ( string $name ) Checks whether the specified property is defined. Parameters: name Name of the property being checked for. Returns: TRUE if it has the property, otherwise FALSE Examples:

ReflectionClass::hasMethod

(PHP 5 >= 5.1.0, PHP 7) Checks if method is defined public bool ReflectionClass::hasMethod ( string $name ) Checks whether a specific method is defined in a class. Parameters: name Name of the method being checked for. Returns: TRUE if it has the method, otherwise FALSE Examples: R

ReflectionClass::hasConstant

(PHP 5 >= 5.1.0, PHP 7) Checks if constant is defined public bool ReflectionClass::hasConstant ( string $name ) Checks whether the class has a specific constant defined or not. Parameters: name The name of the constant being checked for. Returns: TRUE if the constant is defined, otherwise FALSE.

ReflectionClass::getTraits

(PHP >= 5.4.0) Returns an array of traits used by this class public array ReflectionClass::getTraits ( void ) Returns: Returns an array with trait names in keys and instances of trait's ReflectionClass in values. Returns NULL in case of an error. This function is currently not documented; only its argument list is available.