From 8fbfb9f8c59bc1429ebb5e5041417066045838e9 Mon Sep 17 00:00:00 2001 From: Oluwafemi Sule Date: Fri, 23 Mar 2018 14:34:44 +0100 Subject: [PATCH] highlight statement syntax for multiline strings --- pages/The-Basics.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/pages/The-Basics.md b/pages/The-Basics.md index b13ceb2..bfb3a9f 100644 --- a/pages/The-Basics.md +++ b/pages/The-Basics.md @@ -290,6 +290,26 @@ EOD; // closing 'EOD' must be on it's own line, and to th * [Heredoc syntax](http://php.net/language.types.string#language.types.string.syntax.heredoc) +> It should be noted that multiline strings can also be formed by continuing them across multilines in a statement. _e.g._ + +{% highlight php %} +$str = " +Example of string +spanning multiple lines +using statement syntax. +$a are parsed. +"; + +/** + * Output: + * + * Example of string + * spanning multiple lines + * using statement syntax. + * Variables are parsed. + */ +{% endhighlight %} + ### Which is quicker? There is a myth floating around that single quote strings are fractionally quicker than double quote strings. This is