+ 3
What is the difference between "echo" and "print"?
2 Answers
+ 2
print returns values, while echo returns void and in some books I also read that print is little bit slower than echo
+ 2
Hey! I found it!
They have a small difference: Print returns value always, but it's not right about echo.
This code works:
$printSuccess = print "Hello world!"; //$printSuccess = 1
This code does not work:
$echoSuccess = echo "Hello world!"; //Parse error