Bug #16079: Allow '.' (concat) operator on static strings

From: Date: Thu, 14 Mar 2002 19:01:33 +0000
Subject: Bug #16079: Allow '.' (concat) operator on static strings
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-2511@lists.php.net to get a copy of this message
From: steve.venable@lmco.com Operating system: All PHP version: 4.1.1 PHP Bug Type: Feature/Change Request Bug description: Allow '.' (concat) operator on static strings I can understand requiring constants for static initialization. But can the parser be modified to support operators on constants for static initializations? This is especially true for long strings which I can't even break at the end of line for readability. (I almost submitted this as a bug :) Examples: $v = 1 + 2; // Okay static $s = 1 + 2; // Fails parse $v = "this long " ."string"; // Okay static $s = "this long " ."string"; // Fails parse Since only constants are involved the parser could collapse the expression without difficulty. This makes the code much more readable (again thinking of very long strings). In my case I'm building an array of error messages and don't want the array build to occur everytime the function is called, hence I made it static. -- Edit bug report at http://bugs.php.net/?id=16079&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=16079&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=16079&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=16079&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=16079&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=16079&r=support Expected behavior: http://bugs.php.net/fix.php?id=16079&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=16079&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=16079&r=submittedtwice

« previous php.bugs (#2511) next »