From:             xuefer at 21cn dot com
Operating system: *
PHP version:      5CVS-2004-01-31 (dev)
PHP Bug Type:     Feature/Change Request
Bug description:  [request] magic string concat

Description:
------------
as we know, in C/C++, const string will be concat magically
char *str = "FOO" "BAR";

but in php, we used dot '.' to concat, which is widely used as
object.method() method.property in other languages, there isn't much
symbols on our keyboard, this make php have to use $this->foo() $this->bar
for objects
many and many times we type "-" shift + ">" :(

i suggest that php should be able to do:
$hello = "hell" "o";
$hello = $hello " wo"; // same as $hello = $hello . " wo";
$hello .= "rld"; // still, and ever supported

space between expressions means string-concat

$query = "select abc"
 " from table"
 " where ...";

we don't have to:
$query = "select abc"
 . " from table"
 . " where ...";

or:
$query = "select abc" .
 " from table" .
 " where ...";
(hard to modify)

or:
$query = "select abc
  from table
  where ...";
(ugly)

php is for web, web is text, text is string
hope one day all code is written with out using dot concat (.) so we can
deprecate it, and then disabled, and we can $phpers.smile(";)")



-- 
Edit bug report at http://bugs.php.net/?id=27109&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=27109&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=27109&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=27109&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=27109&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=27109&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=27109&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=27109&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=27109&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=27109&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=27109&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=27109&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=27109&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27109&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=27109&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=27109&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=27109&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27109&r=float

Reply via email to