sKunKbad Posted October 27, 2009 Share Posted October 27, 2009 I wonder if php will ever have: public method name(){ instead of: public function name(){ Quote Link to comment https://forums.phpfreaks.com/topic/179156-methods/ Share on other sites More sharing options...
trq Posted October 27, 2009 Share Posted October 27, 2009 Why would it? Quote Link to comment https://forums.phpfreaks.com/topic/179156-methods/#findComment-945193 Share on other sites More sharing options...
corbin Posted October 27, 2009 Share Posted October 27, 2009 Yeah what would be the purpose? A method is just a function inside a class. I do wish the function word were optional though, although really it wouldn't make much of a difference. Quote Link to comment https://forums.phpfreaks.com/topic/179156-methods/#findComment-945350 Share on other sites More sharing options...
sKunKbad Posted October 28, 2009 Author Share Posted October 28, 2009 I know it doesn't make a difference. But a function inside a class is technically a method, so it's just something that I think about. Quote Link to comment https://forums.phpfreaks.com/topic/179156-methods/#findComment-945896 Share on other sites More sharing options...
corbin Posted October 28, 2009 Share Posted October 28, 2009 Well, the definition of method is (on a basic level) just a function inside of a class, so wouldn't using the term 'function' inside of a class basically equate to method? I would imagine it has something to do with not wanting to confuse newbies or the way the PHP engine handles class parsing. Quote Link to comment https://forums.phpfreaks.com/topic/179156-methods/#findComment-945969 Share on other sites More sharing options...
The Little Guy Posted October 28, 2009 Share Posted October 28, 2009 Other languages use function, why should PHP be different? Quote Link to comment https://forums.phpfreaks.com/topic/179156-methods/#findComment-945986 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.