php不同的echo和var_dump输出

Why does echo("$objInst->property | $objInst->propertyTwo"); return a different value to echo($objInst->property."|".$objInst->propertyTwo); ?

Here's the output of an echo with everything wrapped in ""s, incorrect values

oun}wuuw}olo~seou}n~yoyvu zewus in@@@0~and drop it@@@0

Here's the output of an echo with only the pipe in ""s, correct values.

chk|0|Who has actually read infinite jest|~not me@@@0~i get about 80-120 pages in@@@0~and drop it@@@0|Free Trade|Manufacturing Consent

Have you guys run into anything similar?

This should work:

echo("{$objInst->property} | {$objInst->propertyTwo}");

See: http://php.net/manual/en/language.types.string.php