Dropping requirement for `function` keyword for methods in classes/interfaces/etc

From: Date: Tue, 19 Feb 2013 21:44:03 +0000
Subject: Dropping requirement for `function` keyword for methods in classes/interfaces/etc
Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Hi!

As someone mentioned in the thread about short syntax for closures, we could also drop requirement for function keyword when defining/declaring methods in classes, interfaces or traits.

I have long noticed how redundant it is. The patch is pretty easy as it was with commas :)
It is absolutely backwards compatible (you can use function or you can not use it). Here's the patch: https://gist.github.com/nikita2206/4988075

If people will welcome this proposal, I would need some karma for making RFC.


Thread (34 messages)

« previous php.internals (#65975) next »