Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve handling of
#[
attributes in php -a
`php -a` treats lines starting with `#` as comments when deciding if the provided statement is valid. So it passed `#[MyAttr]` to the parser after the user hits enter, causing a syntax error for multi-line statements.. With this patch, the following snippet is parsed correctly ``` php > #[Attr] php > function x() { } php > var_export((new ReflectionFunction('x'))->getAttributes()[0]->getName()); 'Attr' ``` Followup to GH-6085 Closes GH-6086
- Loading branch information