I have made a small function (WordPress), using echo .
/* .. Some code */
switch ($linktype) {
case \"next\":
echo \'
everything that needs to be EVALUATED in some way (expression, function) will be inevitably "pushed" to the end when using dots?
I can't reproduce this behavior. And, according to my knowledge, it should be contrary: echoed (not evaluated) values goes first, and then goes the result of the echo.
it seems you are mixing 2 matters - evaluation and echoing.
when concatenated, all expressions gets evaluated in turn:
function aplus($b){
global $a;
$a += $b;
}
$a=1;
echo $a."|".aplus(1).$a."||".aplus(1).$a;
while if you are of bad practice of mixing echo with statements having output of their own, this separate echo goes first:
function e($s){
echo $s;
}
$a=1;
echo $a."|".e($a +1)."||".e($a+2);