diff --git a/language/types.xml b/language/types.xml index 3a8447242b..69cc4a6882 100644 --- a/language/types.xml +++ b/language/types.xml @@ -169,11 +169,14 @@ $a = 1.234; $a = 1.2e3; - + + + You can escape any other character, but a warning will be issued at the highest warning level. + The second way to delimit a string uses the single-quote ("'") character. When a string is enclosed in single quotes, the only @@ -182,13 +185,19 @@ $a = 1.234; $a = 1.2e3; a single-quoted string. Variables will not be expanded inside a single-quoted string. + Another way to delimit strings is by using here doc syntax ("<<<"). One should provide an identifier after <<<, then the string, and then the same identifier to close the quotation. The closing identifier must begin in the first column of the line. + The label used must follow the same naming rules as any other + label in PHP: it must contain only alphanumeric characters and + underscores, and must start with a non-digit character or + underscore. + Here doc text behaves just like a double-quoted string, without the double-quotes. This means that you do not need to escape quotes @@ -229,6 +238,7 @@ EOT; + Here doc support was added in PHP 4.