[php mode] Make double-quoted string hack also work for single-quoted

Closes #1992