PHP 7.0.6 Released

ReflectionClass::isUserDefined

(PHP 5, PHP 7)

ReflectionClass::isUserDefinedChecks if user defined

Description

public bool ReflectionClass::isUserDefined ( void )

Checks whether the class is user-defined, as opposed to internal.

Parameters

This function has no parameters.

Return Values

Returns TRUE on success or FALSE on failure.

See Also

User Contributed Notes

dhairya lakhera
2 months ago
$internalclass = new ReflectionClass('ReflectionClass');

class Apple {}
$userclass = new ReflectionClass('Apple');

var_dump($internalclass->isUserDefined());
var_dump($userclass->isUserDefined());
To Top