Req #51373 [Opn->Wfx]: remove or change the 'function' in classes

[email protected]
Newsgroups php.bugs
Message-ID <[email protected]>
Edit report at http://bugs.php.net/bug.php?id=51373&edit=1

 ID:          51373
 Updated by:  [email protected]
 Reported by: kjarli at gmail dot com
 Summary:     remove or change the 'function' in classes
-Status:      Open
+Status:      Wont fix
 Type:        Feature/Change Request
 Package:     Unknown/Other Function
 PHP Version: Irrelevant

 New Comment:

functions are by far not deprecated. OO might be useful, but is
definitely not what all PHP really cares for. I don't see why we would
want to change this. It doesn't add functionality, nor does it add to
readability. IMO, changing this would be a strange thing to do.


Previous Comments:
------------------------------------------------------------------------
[2010-03-23 22:46:20] kjarli at gmail dot com

Description:
------------
The function keyword is pretty deprecated in php atm. If you got a
function inside 
a class people always refer to it as a 'method' and not a function.
Besides that, 
there is actually no need for that keyword... 
class foo {
  public function foobar() {}
}
Is actually the same as:

class foo {
  public foobar() {}
}

Should not be hard to understand that it's a function or method...

I propose to either change the keyword to method or remove it completely

Test script:
---------------
<?php
class foo {
  // old
  public function foobar() {}

  // suggestion 0
  public method foobar() {}

  // suggestion 1
  public foobar() {}
}



------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51373&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.