Yes, the parser is not designed to handle PHP syntax. The correct fix for this would be to find where the PHP command is being passed to the SQL parser and change it there.
That's what I did, but I'm not sure whether there was no special reason why it was added here so I asked here.
Michal