ID: 32554
Updated by: [EMAIL PROTECTED]
Reported By: 000005 at gmail dot com
Status: Open
-Bug Type: Scripting Engine problem
+Bug Type: Documentation problem
Operating System: Linux 2.6/Gentoo
PHP Version: 4CVS,5CVS (2005-04-03)
New Comment:
This is not really PHP bug but just missing documentation.
(or I just couldn't find the place where it's documented :)
You can only put static scalars as the default value.
Previous Comments:
------------------------------------------------------------------------
[2005-04-03 07:12:40] 000005 at gmail dot com
Description:
------------
Trying to initialize a member variable using heredoc
notation produces a compiler error:
Parse error: parse error, unexpected T_START_HEREDOC in
/.../foo.php on line 6
Reproduce code:
---------------
<?
class foo
{
public $bar = <<<END
blah blah blah
END;
}
?>
Expected result:
----------------
The member variable $bar to be assigned "blah blah
blah".
Actual result:
--------------
Parse error: parse error, unexpected T_START_HEREDOC in
/.../foo.php on line 6
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32554&edit=1