I am running php 5.4.16 on CentOS7. I am trying to create a multiline file. According to the php syntax I have it correct, but it does not honor the newline. Right now I am going back to basic and just using the example on the php site, and it still does not work. What am I missing? https://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc
my output is : My name is "MyName". I am printing some Foo.Now, I am printing some Bar2.This should print a capital 'A': A
echo <<<EOT
My name is "$name". I am printing some $foo->foo.
Now, I am printing some {$foo->bar[1]}.
This should print a capital 'A': \x41
EOT;
?>
`s as line breaks. – Damocles Jan 09 '20 at 16:06
`. On console, a newline would be `\n`. As such, how is the PHP to implicitly know what you mean (logically) by newline. I think you are going to have to explicitly insert the newline characters you desire. – GetSet Jan 09 '20 at 16:07