|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-07-13 15:15 UTC] tony2001@php.net
[2010-07-23 11:34 UTC] nicolas dot hureau at kwift dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 14 09:00:02 2025 UTC |
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