PHP String concatenation with echo
You can use concatenation to join strings "end to end" while outputting them (with echo or print for example). You can concatenate variables using a . (period/dot).
Similar to concatenation, echo (when used without parentheses) can be used to combine strings and variables together (along with other arbitrary expressions) using a comma (,).
String concatenation vs passing multiple arguments to echo
Passing multiple arguments to the echo command is more advantageous than string concatenation in some circumstances. The arguments are written to the output in the same order as they are passed in.
The problem with the concatenation is that the period . takes precedence in the expression. If concatenated, the
above expression needs extra parentheses for the correct behavior. The precedence of the period affects ternary