What is the difference between “echo” and “print” in PHP?

The main difference between echo and print in PHP are given below:

echoprint
echo can output one or more strings.print can only output one string and it always returns 1.
echo is faster than print because it does not return any value.print is slower compared to echo.
If you want to pass more than one parameter to echo, a parenthesis should be used.Use of parenthesis is not required with the argument list.

Leave a Comment