Both output data, but echo can take several comma-separated arguments and returns nothing, while print takes exactly one argument and always returns 1. Because it returns a value, print can sit inside an expression, such as an if condition.
echo "Hello", " World"; // Works
print "Hello World"; // Works
// print "Hello", " World"; // Error - multiple parameters not allowed
Neither is a real function. Both are language constructs, so parentheses are optional for both. echo("hello") works only because the parentheses belong to the expression being printed, which is also why echo("a", "b") is a parse error. As constructs, neither works as a variable function, where PHP calls the function whose name a variable holds.
echo is marginally faster because it returns no value, but the gap is too small to matter. The <?= tag is shorthand for <?php echo.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
The diagram below the answer is the concept . Jump to it ↓