On Sun, Jul 5, 2020 at 9:36 AM Michał Marcin Brzuchalski <
michal.brzuchal...@gmail.com> wrote:

> Hi internals,
>
> I realise we're tight to the deadline but from my calculations,
> this RFC should fit with 2w discussion and 2w voting before feature freeze.
>
> The proposal is to allow two statements to skip parentheses so they don't
> look like expressions.
> This goes to `declare` and `__halt_compiler`.
> Changes have already been implemented and respective PR's are linked to the
> RFC.
>
> You can find the RFC at
> https://wiki.php.net/rfc/language-constructs-syntax-changes
>
> There is no BC break!
> Proposed changes only allow certain constructs to be considered valid.
>

I don't think introducing alternative syntax for declare and halt_compiler
is a good idea. It introduces two ways to write the same thing, without
much benefit I can see.

Your stated goal is to make it clearer that these aren't functions, but
language constructs. I'm not sure your change helps that much: While
"__halt_compiler()" looks like a function call, "__halt_compiler" looks
like a constant lookup. For the declare syntax, "declare(a = 1)" is already
illegal syntax for functions, even with the parentheses.

Regards,
Nikita

Reply via email to