cvs: phpdoc /en/language types.xml

From: Date: Tue, 05 Apr 2005 12:20:45 +0000
Subject: cvs: phpdoc /en/language types.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969367464@lists.php.net to get a copy of this message
vrana Tue Apr 5 08:20:45 2005 EDT Modified files: /phpdoc/en/language types.xml Log: Heredoc in class members (bug #32554) http://cvs.php.net/diff.php/phpdoc/en/language/types.xml?r1=1.151&r2=1.152&ty=u Index: phpdoc/en/language/types.xml diff -u phpdoc/en/language/types.xml:1.151 phpdoc/en/language/types.xml:1.152 --- phpdoc/en/language/types.xml:1.151 Thu Mar 31 10:57:59 2005 +++ phpdoc/en/language/types.xml Tue Apr 5 08:20:44 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.151 $ --> +<!-- $Revision: 1.152 $ --> <chapter id="language.types"> <title>Types</title> @@ -822,6 +822,24 @@ identifier is not found then a parse error will result with the line number being at the end of the script. </simpara> + <para> + It is not allowed to use heredoc syntax in initializing class members. + Use other string syntaxes instead. + <example> + <title>Invalid example</title> + <programlisting role="php"> +<![CDATA[ +<?php +class foo { + public $bar = <<<EOT +bar +EOT; +} +?> +]]> + </programlisting> + </example> + </para> </warning> <para> @@ -829,7 +847,7 @@ the double-quotes. This means that you do not need to escape quotes in your here docs, but you can still use the escape codes listed above. Variables are expanded, but the same care must be taken - when expressing complex variables inside a here doc as with + when expressing complex variables inside a heredoc as with strings. <example> <title>Heredoc string quoting example</title>

« previous php.doc (#969367464) next »