Handle heredoc and escaped strings in the php translation extractor

The PhpExtractor does not work when there is whitespace, a heredoc, or escaped strings.

This makes the extractor a little more robust and able to handle these types of strings.