Hi. Regarding this bug http://bugs.php.net/bug.php?id=45052 - basically a missing \ in the example's code for nowdoc - compare Example 3 for http://docs.php.net/manual/en/language.types.string.php#language.types.string.syntax.nowdoc against http://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.nowdoc or http://uk.php.net/manual/en/language.types.string.php#language.types.string.syntax.nowdoc, http://us.php.net/manual/en/language.types.string.php#language.types.string.syntax.nowdoc, http://jp.php.net/manual/en/language.types.string.php#language.types.string.syntax.nowdoc
All mirrors are missing the \ in the example. The xml is accurate - as I understand it a CDATA tag requires no escaping. http://cvs.php.net/viewvc.cgi/phpdoc/en/language/types/string.xml?view=annotate lines 361 and 372 are both inside CDATA tags. For docs.php.net both are rendered correctly. In my local setup I get the right result. The mirrors though are dropping the \ in the example, but showing it correctly in the example's output. And what makes this more weird is that the heredoc example has almost the same code and is rendered correctly. Heredoc... <programlisting role="php"> <![CDATA[ <?php $str = <<<EOD Example of string spanning multiple lines using heredoc syntax. EOD; /* More complex example, with variables. */ class foo { var $foo; var $bar; function foo() { $this->foo = 'Foo'; $this->bar = array('Bar1', 'Bar2', 'Bar3'); } } $foo = new foo(); $name = 'MyName'; echo <<<EOT My name is "$name". I am printing some $foo->foo. Now, I am printing some {$foo->bar[1]}. This should print a capital 'A': \x41 EOT; ?> ]]> </programlisting> Nowdoc <programlisting role="php"> <![CDATA[ <?php $str = <<<'EOD' Example of string spanning multiple lines using nowdoc syntax. EOD; /* More complex example, with variables. */ class foo { public $foo; public $bar; function foo() { $this->foo = 'Foo'; $this->bar = array('Bar1', 'Bar2', 'Bar3'); } } $foo = new foo(); $name = 'MyName'; echo <<<'EOT' My name is "$name". I am printing some $foo->foo. Now, I am printing some {$foo->bar[1]}. This should not print a capital 'A': \x41 EOT; ?> ]]> </programlisting> The \ is actually 0x5C in both cases (as it should be). I've waited until the mirrors had chance to rebuild the docs (they now show 1st August 2008). The XML was updated and reverted on the 31st. The only thing I can come up with is that the highlight_string() function compiled into the mirror's PHP doesn't support nowdoc properly or at least supports it differently to docs.php.net and the win32 snaps.php.net for PHP 5.3.0-dev (cli) (built: Jul 28 2008 00:21:59) I think this is not a doc bug but actually a mirror issue. Not the mirroring issue, but the mirror's version of PHP. Unless, of course, the mirrors aren't using PhD? Any one with any ideas? Richard. -- ----- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!"