Call echo With Commas

<?php

echo 'a', 'b', 'c'; // abc
echo ('a' . 'b' . 'c'); // abc
print('a' . 'b' . 'c'); // abc

?>

The most efficient way to call echo is to use commas. Each argument of echo is then sent to the output. Echo is not a function, but a language construct, with this special ability.

echo is sometimes used with parenthesis: it makes it look like an actual function call. Yet, it also reduces the number of arguments from arbitrary to one: there can be only one element inside a parenthesis.

Hence, any list of several arguments passed to echo is concatenated into one. This is a useless concatenation, as it is immediately discarded. And echoing the arguments one after the other does the same job.

In the end, it is a micro-optimisation anyway.

See Also

PHP Features

Last updated: 14 July 2026