On Wed, Aug 23, 2023 at 9:36 AM chopins xiao <chopins.x...@gmail.com> wrote:
> I use @ instead of #[] as attribute token. attribute use whitespace marks > are closed. Of course you can start with @@ or #, other. > error control use @@ instead of @, add T_SILENCE token > > <snip> > > my implemented: > https://github.com/chopins/php-src/tree/new-syntax/attribute > > > Other new syntax implemented (Verification of feasibility) : > > https://github.com/chopins/php-src/blob/php-alternative-syntax/alternative-syntax.md > > > Regards > Chopin Xiao > Hey Chopin You can check: https://wiki.php.net/rfc/attributes_v2, that initially implemented it with <<Attribute>> https://wiki.php.net/rfc/shorter_attribute_syntax, that changed the syntax to @@Attribute https://wiki.php.net/rfc/shorter_attribute_syntax_change, that finally changed the syntax to #[Attribute] In time, the last syntax proved to be good, especially when dealing with code that must run as well on PHP versions before PHP 8.0, as it's interpreted there as a comment. All I can see right now are a lot of backward incompatible changes that are unlikely to be accepted with no clear gains. Please consider them, so that there is a clear upgrade path for existing codebase. Regards, Alex