On Wed, 20 Feb 2013 08:02:36 -0000, Sanford Whiteman
<swhitemanlistens-softw...@cypressintegrated.com> wrote:
While I'm thinking about this (though I should leave it alone): who's
to say that PHP won't some day get inner classes? By deciding the
"default" inner member of a class will be a function, you're choosing
the one that has a global/procedural equivalent where the short syntax
won't work, instead of leaving the concept unused for the possible
future when:
class myClass {
mySomething { // is equivalent to class mySomething {
(Yes, you could say mySomething(...) { } is a public function and
mySomething { } is an innner class, but you get the idea.)
-- S.
Classes always should be declared with class keyword, because there could
be ambiguity whether it's class, interface or trait.
Also, I will say it again: as Sara noted, we *really* shouldn't let users
define methods without any modifiers, like this: class Foo { asd() { echo
"this is parse error"; } }
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php