$internalclass = new ReflectionClass('ReflectionClass');
class Apple {}
$userclass = new ReflectionClass('Apple');
var_dump($internalclass->isUserDefined());
var_dump($userclass->isUserDefined());
(PHP 5, PHP 7)
ReflectionClass::isUserDefined — Checks if user defined
Checks whether the class is user-defined, as opposed to internal.
This function has no parameters.
Returns TRUE
on success or FALSE
on failure.
$internalclass = new ReflectionClass('ReflectionClass');
class Apple {}
$userclass = new ReflectionClass('Apple');
var_dump($internalclass->isUserDefined());
var_dump($userclass->isUserDefined());