From 593c33e4cac86297045b18146c84ee39e0158626 Mon Sep 17 00:00:00 2001 From: Torben Wilson Date: Sun, 10 Sep 2000 20:30:53 +0000 Subject: [PATCH] Document that heredoc labels are the same as other PHP labels. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@32411 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/types.xml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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.