You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When dealing with truncated or otherwise incomplete php files, sometimes the file ends inside a block.
function incomplete() {
returnsomething();
for some block types - class, switch - it comes out fine, just a syntax error and dropping the entry. For the majority though, - do, foreach, function, if, namespace, while - the parser returns nil and php-parser crashes.
I haven't yet seen an unclosed parenthetical break the parser, but that seems like a possibility too.
The text was updated successfully, but these errors were encountered:
When dealing with truncated or otherwise incomplete php files, sometimes the file ends inside a block.
for some block types -
class
,switch
- it comes out fine, just a syntax error and dropping the entry. For the majority though, -do
,foreach
,function
,if
,namespace
,while
- the parser returnsnil
andphp-parser
crashes.I haven't yet seen an unclosed parenthetical break the parser, but that seems like a possibility too.
The text was updated successfully, but these errors were encountered: