in PHP by (13.3k points)
0 like 0 dislike

Is there any difference between __METHOD__ and __FUNCTION__ PHP predefined constants and what is fundamental difference?

1 Answer

0 like 0 dislike
by (13.3k points)

Difference there is! PHP predefined constant __FUNCTION__ contain only function or method name, e.g. bar, but __METHOD__ constant contain function or method name and also class name, e.g. Foo::bar.

Your answer

Try to answer the question as detailed as possible.
Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.