#38098 [Opn->Bgs]: String concatenation
| From: | tony2001@php.net | Date: | Thu, 13 Jul 2006 15:15:19 +0000 |
| Subject: | #38098 [Opn->Bgs]: String concatenation | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-99417@lists.php.net to get a copy of this message | ||
ID: 38098
Updated by: tony2001@php.net
Reported By: wiart at yahoo dot com
-Status: Open
+Status: Bogus
Bug Type: Unknown/Other Function
Operating System: Linux (Fedora core 4) - AMD64
PHP Version: 5.1.4
New Comment:
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
Previous Comments:
------------------------------------------------------------------------
[2006-07-13 15:12:52] wiart at yahoo dot com
Description:
------------
reproduced with PHP 5.1.2 (sorry, no time to test with 5.1.4).
Impossible to concatenate strings in a class member declaration, it
generates a PHP "Parse error".
Very annoying when, for example, one want to create a member string
which is a concatenation of a text and a constant
Reproduce code:
---------------
<?php
class MyClass {
public $myString = 'test1'.'test2';
}
$myClass = new MyClass();
echo "Result is: ".$myClass->myString;
?>
Expected result:
----------------
Result is: test1test2
Actual result:
--------------
Parse error: parse error, unexpected '.', expecting ')' in
/home/wiart/genomequest/apache/web/GQ/lib/comparisonNew/HTMLlaunchform.php
on line 5
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38098&edit=1