diff options
author | Boris Verkhovskiy <boris.verk@gmail.com> | 2024-04-03 02:02:49 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-03 02:02:49 -0700 |
commit | 616e40816dfdf90c2418477327729169db0274b3 (patch) | |
tree | 0b5ae76e529c34f6648442815f535626eaeebf69 /php.html.markdown | |
parent | 3e22775a641831a82c59a3b6197240b2fcd9a76b (diff) | |
parent | 638494ae2a0c089717f2bfff965da52e3b15a4f9 (diff) |
Merge branch 'master' into elixir-casing
Diffstat (limited to 'php.html.markdown')
-rw-r--r-- | php.html.markdown | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/php.html.markdown b/php.html.markdown index 61f1c00c..1ef52f68 100644 --- a/php.html.markdown +++ b/php.html.markdown @@ -92,9 +92,10 @@ $escaped = "This contains a \t tab character."; $unescaped = 'This just contains a slash and a t: \t'; // Enclose a variable in curly braces if needed -$apples = "I have {$number} apples to eat."; -$oranges = "I have ${number} oranges to eat."; -$money = "I have $${number} in the bank."; +$number = 23; +$apples = "I have {$number} apples to eat."; // => I have 23 apples to eat. +$oranges = "I have ${number} oranges to eat."; // => I have 23 oranges to eat. +$money = "I have $${number} in the bank."; // => I have $23 in the bank. // Since PHP 5.3, nowdocs can be used for uninterpolated multi-liners $nowdoc = <<<'END' @@ -109,7 +110,7 @@ $sgl_quotes END; // String concatenation is done with . -echo 'This string ' . 'is concatenated'; +echo 'This string ' . 'is concatenated'; // Returns 'This string is concatenated' // Strings can be passed in as parameters to echo echo 'Multiple', 'Parameters', 'Valid'; // Returns 'MultipleParametersValid' |