<?php
function dosomething(){
echo "do\n";
}
$temp="test".dosomething();
echo $temp;
?>
expected result:testdo
but actual result is: do
test%
I know how to change the code to get the expected result. But what i doubt is why the code prints result like this. Can someone explain it?Thanks!