Bug 1795926 and 1894455 report a problem that the PHP parser matches keywords inside multiline comments. I have written a patch that largely solves this problem by looking at what is in front of the keyword. There should be only whitespace or keywords such as "public", "static" or "abstract" in front of a class or function statement.
The patch does not fix this 100%. It is technically possible to declare classes and functions after another statement on the same line, but nobody ever does that because it makes for very unreadable code. On the other hand, a lot of people do comment their code so this patch should give a large improvement in quality.
Since this patch also looks at PHP5 keywords such as "static" and "abstract", it also adds the .php4 and .php5 extensions to the list of PHP file extensions.
Log in to post a comment.
Sign up for the SourceForge newsletter:No, thanks