#44227 [Opn->Bgs]: PHP parses string inside quotes as PHP code
| From: | cmouse at desteem dot org | Date: | Sat, 23 Feb 2008 17:04:00 +0000 |
| Subject: | #44227 [Opn->Bgs]: PHP parses string inside quotes as PHP code | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-122604@lists.php.net to get a copy of this message | ||
ID: 44227
User updated by: cmouse at desteem dot org
Reported By: cmouse at desteem dot org
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Windows XP x64
PHP Version: 5.2.5
New Comment:
Sorry, my bad.
Previous Comments:
------------------------------------------------------------------------
[2008-02-23 16:56:47] cmouse at desteem dot org
Description:
------------
For some reason, php seems to think that code inside single or double
quotes spanned over several lines is source code.
Reproduce code:
---------------
<?php
$lang = 'fi';
$str = '
<?php
class Test_Me_Here_' . $lang . ' {
}';
echo $str
?>
Expected result:
----------------
> php test.php
class Test_Me_Here_fi {
}
>
Actual result:
--------------
>php test.php
PHP Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING,
expecting '{' in C:\eclipse\workspace\luuppi\vendors\Luuppi\test.php on
line 7
>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44227&edit=1