Escape \$ characters in php code generation