#45142 [NEW]: Request that NowDoc works within class const
| From: | chadsspameateremail at yahoo dot com | Date: | Sat, 31 May 2008 04:41:12 +0000 |
| Subject: | #45142 [NEW]: Request that NowDoc works within class const | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-125389@lists.php.net to get a copy of this message | ||
From: chadsspameateremail at yahoo dot com
Operating system: Mac OS X
PHP version: 5.3CVS-2008-05-31 (snap)
PHP Bug Type: Feature/Change Request
Bug description: Request that NowDoc works within class const
Description:
------------
I have read about nowdoc which sounds exciting and is currently being
added in 5.3.0! After quickly searching the bugs reported on php.net I
couldn't figure out if nowdoc strings work within class constants or not
and what the plan was going forward.
I am formally requesting that nowdoc works from within constants defined
within classes. This would be *very* handy.
An example is shown below. Actually this is just a modified example of
what I found online documenting nowdoc at:
http://ca3.php.net/manual/en/language.types.string.php#language.types.string.syntax.nowdoc
<?php
class foo {
const kbar = <<<'EOT'
bar
EOT;
}
?>
Because nowdocs "can be used in any static data context" according to the
documentation I don't see why it couldn't be used from within class
constants as shown above (hopefully!). In any case I'm requesting that
this feature is implemented. I don't know if this is already what is
planned or not but I certainly hope it gets added. Maybe it has already
been planned and added for all I know. :)
Thank you. :)
Chad.
--
Edit bug report at http://bugs.php.net/?id=45142&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45142&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45142&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45142&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=45142&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=45142&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=45142&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=45142&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=45142&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=45142&r=support
Expected behavior: http://bugs.php.net/fix.php?id=45142&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=45142&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=45142&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=45142&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45142&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=45142&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=45142&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=45142&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=45142&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=45142&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=45142&r=mysqlcfg