Doc #70227 [NEW]: Define consts with heredocs/nowdocs

From: Date: Mon, 10 Aug 2015 12:21:35 +0000
Subject: Doc #70227 [NEW]: Define consts with heredocs/nowdocs
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-12596@lists.php.net to get a copy of this message
From: dpa-bugs at aegee dot org Operating system: PHP version: Irrelevant Package: Documentation problem Bug Type: Documentation Problem Bug description:Define consts with heredocs/nowdocs Description: ------------ --- From manual page: http://www.php.net/language.types.string --- The above page states under Heredocs: " As of PHP 5.3.0, it's possible to initialize static variables and class properties/constants using the Heredoc syntax:" Example #4 Using Heredoc to initialize static values" The example shows how to use heredoc to put data in const member. But under nowdocs it states: "Unlike heredocs, nowdocs can be used in any static data context. The typical example is initializing class properties or constants: Example #7 Static data example" Then http://php.net/manual/en/language.oop5.constants.php repeats "Unlike heredocs, nowdocs can be used in any static data context. " The contradition is that Example 4 demonstrates how to use heredoc to store data in const member, but the text describes this as not allowed. -- Edit bug report at https://bugs.php.net/bug.php?id=70227&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=70227&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=70227&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=70227&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=70227&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=70227&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=70227&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=70227&r=needscript Try newer version: https://bugs.php.net/fix.php?id=70227&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=70227&r=support Expected behavior: https://bugs.php.net/fix.php?id=70227&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=70227&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=70227&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=70227&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70227&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=70227&r=dst IIS Stability: https://bugs.php.net/fix.php?id=70227&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=70227&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=70227&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=70227&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=70227&r=mysqlcfg

« previous php.doc.bugs (#12596) next »