ID: 45142 Updated by: [EMAIL PROTECTED] Reported By: chadsspameateremail at yahoo dot com -Status: Open +Status: Bogus Bug Type: Feature/Change Request Operating System: Mac OS X PHP Version: 5.3CVS-2008-05-31 (snap) New Comment:
It works with class constants. Previous Comments: ------------------------------------------------------------------------ [2008-05-31 04:41:12] chadsspameateremail at yahoo dot com 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 this bug report at http://bugs.php.net/?id=45142&edit=1