What is the difference between print and echo in PHP?

The main difference between print and echo in PHP is that print can only output one value at a time, while echo can output multiple values separated by commas. Additionally, print returns a value (1) which can be used in expressions, while echo does not have a return value. In most cases, echo is preferred for its slightly faster performance and less typing required.

// Using echo to output multiple values
echo "Hello, ";
echo "world!";