Re: Concatenation vs. Interpolation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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" ;

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux