Re: Concatenation vs. Interpolation
| From: | Danial Rahmanzadeh | Date: | Mon, 13 Aug 2007 02:04:41 +0000 |
| Subject: | Re: Concatenation vs. Interpolation | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-260744@lists.php.net to get a copy of this message | ||
In my opinion, concatenation reduces code readability because unlike
java(that uses + operator), php uses dot(.) for concatenation consider the
following codes:
//java
String mystr="hello"+"world";
is more readable from:
//php
$mystr="hello"."world";
if you only need echoing something to output(which is not usually the case
in MVC and/or other effective methods), the fastest way is using comma:
echo 'hello',$mystr,"blah","blah" ;