Concatenation Operator
Posted
by Chaitanya
on Stack Overflow
See other posts from Stack Overflow
or by Chaitanya
Published on 2010-06-15T00:45:28Z
Indexed on
2010/06/15
1:22 UTC
Read the original article
Hit count: 354
php
|concatenation
This might be a silly question but it struck me, and here i ask.
<?php
$x="Hi";
$y=" There";
$z = $x.$y;
$a = "$x$y";
echo "$z"."<br />"."$a";
?>
$z
uses the traditional concatenation operator provided by php and concatenates, conversely $a doesn't,
My questions:
by not using the concatenation operator, does it effect the performance?
If it doesn't why at all have the concatenation operator.
Why have 2 modes of implementation when one does the work?
© Stack Overflow or respective owner