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('TestClass');
$abstractClass = new ReflectionClass('TestAbstractClass');

var_dump($testClass->isAbstract());
var_dump($abstractClass->isAbstract());
?>

The above example will output:

bool(false)
bool(true)
See also:

ReflectionClass::isInterface() -

Class Abstraction -

doc_php
2016-02-24 16:13:23
Comments
Leave a Comment

Please login to continue.