mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
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
This commit is contained in:
parent
5971e9e905
commit
593c33e4ca
1 changed files with 11 additions and 1 deletions
|
@ -169,11 +169,14 @@ $a = 1.234; $a = 1.2e3;
|
|||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table></para>
|
||||
</table>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You can escape any other character, but a warning will be issued
|
||||
at the highest warning level.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
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 <emphasis>not</emphasis> be
|
||||
expanded inside a single-quoted string.
|
||||
</para>
|
||||
|
||||
<simpara>
|
||||
Another way to delimit strings is by using here doc syntax
|
||||
("<<<"). One should provide an identifier after
|
||||
<literal><<<</literal>, then the string, and then the
|
||||
same identifier to close the quotation. The closing identifier
|
||||
<emphasis>must</emphasis> 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.
|
||||
</simpara>
|
||||
|
||||
<para>
|
||||
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;
|
|||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
|
||||
<note>
|
||||
<para>
|
||||
Here doc support was added in PHP 4.
|
||||
|
|
Loading…
Reference in a new issue