$internalclass = new ReflectionClass('ReflectionClass');
class Apple {}
$userclass = new ReflectionClass('Apple');
var_dump($internalclass->isUserDefined());
var_dump($userclass->isUserDefined());
(PHP 5, PHP 7, PHP 8)
ReflectionClass::isUserDefined — 检查是否为用户定义
此函数没有参数。
$internalclass = new ReflectionClass('ReflectionClass');
class Apple {}
$userclass = new ReflectionClass('Apple');
var_dump($internalclass->isUserDefined());
var_dump($userclass->isUserDefined());