This question already has an answer here:
Running PHP 7.0.1 I have come across a problem, I use error_log('....'.PHP_EOL.'...');
but when I look at the log file, I get verbatim in the output.
error_log is set up to use syslog, and ends up in apaches error_log. This is a CentOS 7 system.
Bypassing syslog is not an option as that removes the ability to use syslog forwarding to a central log server.
</div>
if you're worried about cross-os compatibility, just use " ". Seems to be the better choice just about every time...
Also remember that in single-quotes ( ' ' ) will, indeed, print out the verbatim. double-quotes ( " " ) will get you what you want.