#20516 [Opn->]: RFC: C-style string concatenation

From: Date: Wed, 20 Nov 2002 13:38:51 +0000
Subject: #20516 [Opn->]: RFC: C-style string concatenation
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-25336@lists.php.net to get a copy of this message
 ID:               20516
 Updated by:       sander@php.net
 Reported By:      dw-php.net@botanicus.net
-Status:           Open
+Status:           Won\'t fix
 Bug Type:         Feature/Change Request
 Operating System: Linux
 PHP Version:      4.2.3
 New Comment:

Why do you want that? PHP really doesn't need that, since we have the
dot as string concatenation operator. What's wrong with it?
"FOO" . /* weird comment if you like that */ "BAR"



Previous Comments:
------------------------------------------------------------------------

[2002-11-20 07:30:13] dw-php.net@botanicus.net

Hi there,

I was wondering if it would be at all possible to get ANSI C / ISO
C99-style string literal concatenation added?

The PHP syntax already borrows so much from C that this seems to be a
worthy addition. It would also make it much easier for wrapping ugly
SQL for pretty source files.

String literal concatenation being:

$a =   "MY NAME IS "
"DAVE WILSON" /* some comment tokens
that get ignored */ "WAS HERE" // 2002
"2003";


Or, more useful:

"SELECT id,x,y,z FROM tbl " /* grab required cols */
"WHERE y = %d"  /* for our y coordinate. */

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=20516&edit=1



Thread (4 messages)

« previous php.bugs (#25336) next »