Hello,

yes, that would create ambiguity in the parser since `#` (just like `//`)
is for comments.

Best regards,
Benas

On Thu, Jun 4, 2020, 11:03 AM Peter Bowyer <phpmailingli...@gmail.com>
wrote:

> Hi Theodore,
>
> On Thu, 4 Jun 2020 at 00:55, Theodore Brown <theodor...@outlook.com>
> wrote:
>
> > https://wiki.php.net/rfc/shorter_attribute_syntax
>
>
> Thanks for creating this RFC and for including "Comparison to other
> languages" in it. A provisional +1 from me.
>
> Does the PHP parser prevent us from adopting #[attr]? I presume C#'s [attr]
> syntax and C++'s  [[attr]] are impossible due to PHP's short array syntax.
>
> Peter
>

Reply via email to