summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_prompt.c
diff options
context:
space:
mode:
authorTyson Andre <tysonandre775@hotmail.com>2020-09-06 09:43:09 -0400
committerTyson Andre <tysonandre775@hotmail.com>2020-09-06 10:40:26 -0400
commit1fc961e2de866ad426ce83dae760605599934673 (patch)
tree15fe11591ee950ce69bb17c1a61585c9a7ed3675 /sapi/phpdbg/phpdbg_prompt.c
parent9439ca53227b23e9a0eb0173c80f712ed480fdd8 (diff)
downloadphp-git-1fc961e2de866ad426ce83dae760605599934673.tar.gz
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
Diffstat (limited to 'sapi/phpdbg/phpdbg_prompt.c')
0 files changed, 0 insertions, 0 deletions