Since PHP does not provide a way to check if a method is magic or not, you have two options.
Documents say that
PHP reserves all function names starting with __ as magic. it is recommended that you do not use function names from __ to PHP if you need documentary magic functionality.
Therefore, you can simply check if the method name begins with __:
if(strpos($methodName, '__') === 0){
echo "$methodName is magic";
}
, - __myNewMethod, , , PHP .
. , , :
__construct(), __destruct(), __call(), __callStatic(),
__get(), __set(), __isset(), __unset(), __sleep(),
__wakeup(), __toString(), __invoke(), __set_state() and __clone()
, PHP , .
, , , .
PHP