Doc #70772 [NEW]: nowdoc does not work as documented
| From: | teo8976 at gmail dot com | Date: | Thu, 22 Oct 2015 18:25:29 +0000 |
| Subject: | Doc #70772 [NEW]: nowdoc does not work as documented | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-12834@lists.php.net to get a copy of this message | ||
From: teo8976 at gmail dot com
Operating system:
PHP version: Irrelevant
Package: *General Issues
Bug Type: Documentation Problem
Bug description:nowdoc does not work as documented
Description:
------------
---
From manual page: http://www.php.net/language.types.string
---
The example regarding newdoc syntax is broken.
Test script:
---------------
<?php
$str = <<<'EOD'
Example of string
spanning multiple lines
using nowdoc syntax.
EOD;
Expected result:
----------------
Either the script should work, or it should be replaced with a working
example in the docs
Actual result:
--------------
Parse error: syntax error, unexpected end of file, expecting variable
(T_VARIABLE) or heredoc end (T_END_HEREDOC) or ${
(T_DOLLAR_OPEN_CURLY_BRACES) or {$ (T_CURLY_OPEN) in /in/T9Wfr on line
6
The error message varies depending on the version of PHP.
--
Edit bug report at https://bugs.php.net/bug.php?id=70772&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=70772&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=70772&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=70772&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=70772&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=70772&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=70772&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=70772&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=70772&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=70772&r=support
Expected behavior: https://bugs.php.net/fix.php?id=70772&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=70772&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=70772&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=70772&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70772&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=70772&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=70772&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=70772&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=70772&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=70772&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=70772&r=mysqlcfg