The file extension indicates to Atom what grammar it should use, but you just saying the file extension doesn’t tell us what grammar it’s actually using. If someone wants to try to replicate it, they can’t do that without knowing exactly which package is involved.
I’ve taken a look at it, and it has to do with the first regex in the php.cson file of the language-php package:
A bit of testing on Regex101 reveals that the negative lookahead (?![^?]*\\?>) is the malefactor. I appear to have fixed it by removing that lookahead, but I’m not sure what the lookahead was there for in the first place. To figure that out, I opened an issue to ask about it and will submit a PR if there’s nothing wrong with removing it.