On 4/25/2016 10:04 PM, Rowan Collins wrote: > On 25/04/2016 19:37, Stanislav Malyshev wrote: >> Hi! >> >>> @attr() - is a valid "silenced" call to function named "attr". >>> This syntax can't be reused. >> Not valid if it's in the middle of class definition, and not valid in >> form of: >> >> @attr() function foo() { ... } >> >> This is not a valid PHP syntax now. So I'm not sure why it can't be >> used. << is an operator too and so is >> . >> > > No, but this is valid: > > @atrr(); function foo() { ... } > > That's perhaps a little too close for comfort...? > > Regards, >
Actually I agree with Stanislav (in pretty much every point he made so far) on the syntax discussion, however, I already said that the brackets are the main problem and it seems as it nobody sees it but your example illustrates it perfectly. @fopen('file', 'r'); function foo(){} @deprecated function foo(){} @throws InvalidArgumentException function foo(){} @route ['name' => 'foo'] function foo(){} Leaving out the brackets makes it very clear. I am in an extreme rush and will read more in the thread the next days, sorry. -- Richard "Fleshgrinder" Fussenegger
signature.asc
Description: OpenPGP digital signature