What is the difference between Echo and Print in PHP
0
The main difference between echo and print in PHP is given below:
| echo | |
|---|---|
| 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. | The use of parenthesis is not required with the argument list. |
Sign in to add a comment
0 Answers
0
📝 No answers yet!
Be the first to answer this interview question.
Your Answer
Sign in to post your answer and help the community.