Javascript
You are in luck, in ES2015 specs, javascript now allows template literals using back ticks.
console.log(`hello "world!" I'm doing well :)`);
PHP
Use Nowdocs. Don't use Heredocs unless you want to evaluate php code inside the string.
Note: someone already answered this, but I'll just reiterate to contain a whole solution.
echo <<<'STR'
`hello "world!" I'm doing well :)`
STR;
Don't use Heredocs
echo <<<STR
`hello "world!" I'm doing well :)`
STR;
Or
echo <<<"STR"
`hello "world!" I'm doing well :)`
STR;
Difference is the single quoted name. This is a Heredoc. It will evaluate PHP code denoted by ${expression} in your string.
Don't use back ticks
In PHP backticks will be evaluated as a shell command and return the output of said shell command.