79193229

Date: 2024-11-15 16:38:53
Score: 0.5
Natty:
Report link

Yes! there is a method in the Reflection class isUserDefined https://www.php.net/manual/en/reflectionclass.isuserdefined.php

the other methods use the reflection class and then a subtractive check. With this you get just what you need in a single line of code.

$reflect = new \ReflectionClass::isUserDefined();

or

$rc = new \ReflectionClass($class);
exit(var_dump($rc->isUserDefined));
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Carl McDade