Hi, On 22/07/2020 19:09, tyson andre wrote: > I think that `#[` has its own issues, but am open to re-voting on it. > For example, the following snippet would get parsed differently in PHP 7.4 > and PHP 8.0, given a hypothetical JIT annotation for Opcache. > With <<Opcache\Jit>>, it would give people a clear indication that the file > required PHP 8.0, > but a one-line annotation might be silently treated differently in many > subtle ways in 7.4. > It's probably possible to amend the parser make it an error to put the > function declaration on the same line or to have other `#` comments > within a multi-line #[ annotation, > but I really dislike the special casing it would add.
This is pretty much the reason why I didn't go for '#[' as my first choice: the false sense of backwards compatibility that can be easily (and inadvertently) defeated with multiline attributes or inline function definition. Since '@@' is causing such unrest, I'd be happy to revisit my choice and embrace '#[', which was the second option in my vote. Cheers -- Matteo Beccati Development & Consulting - http://www.beccati.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php