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
It is still a parse error which should be detected. To contrast, function strlen($s) {} would not be a parse error, but evaluation would result in a PHP error at runtime.
Also something to note: empty is a valid name for a class method in PHP 7
Summary
A function name must be a
T_STRING
token (or whatever its equivalent is in this parser).Sample code:
function empty() {}
Expected
Parse error: syntax error, unexpected 'empty' (T_EMPTY), expecting '('
Actual
No error.
The text was updated successfully, but these errors were encountered: