There are some differences between echo and print in php, echo and print are not functions.
First, you can pass more than one parameter to echo, print doesn’t allow more than one parameter.
Example:
Now, let’s see something interesting…
First, you use \ (backslash) character to treat $a as a string not variable. Then, this is important, the code will be executed in this manner: first is executed print then echo. You may ask but why it will output “1″… Let’s see the next example:
Remember that print($arg) will return 1!
As you can see, it will output 51 because php print is executed first (5) and with echo returns 1.