ID:               35525
 User updated by:  snoyes at gmail dot com
 Reported By:      snoyes at gmail dot com
 Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: Windows XP
 PHP Version:      5.1.1
 New Comment:

Hmm, just noticed that there is an error in my reproduce code (missing
the '='), but corrected, it still causes the indicated error.

Code should be:
static $x = <<<TEXT
any text here
TEXT;

If we remove the "static" keyword, there is no error.


Previous Comments:
------------------------------------------------------------------------

[2005-12-02 18:54:04] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

. 

------------------------------------------------------------------------

[2005-12-02 18:50:25] snoyes at gmail dot com

Description:
------------
Cannot assign static variables using heredoc.  The manual indicates
heredoc is a string delimiter, interchangable with double quotes.  When
assigning to static variables, it acts like an expression.

Reproduce code:
---------------
<?php
static $x <<<TEXT
any text here
TEXT;

echo $x;
?>

Expected result:
----------------
any text here

Actual result:
--------------
Parse error: parse error, unexpected T_START_HEREDOC, expecting ',' or
';' in [file] on line 3


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=35525&edit=1

Reply via email to