Can I use it as a method name in my classes?
It appears to be a function: http://www.php.net/manual/en/ref.misc.php
But I see there listed some language constructs too, like die and exit.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When you can… you can, when you can’t… you’ll know 🙂
See a list of reserved words here http://php.net/manual/en/reserved.php and avoid them. Any good PHP IDE will warn you when you attempt to illegal-name your methods.
There’s another issue. If you forget $this->Method() and you just use Method() in your class, it will work as it’s defined as a function. This will lead to freak and hard to find bugs.