Press "Enter" to skip to content

What is the difference’s between print and echo in php?

0
Print and echo both are language constructs that means the PHP compiler knows the exact syntax of the echo/print() statement. Language constructs act like some keywords, they already defined by the compiler.
Let come to the Differences:-
 
  1. echo do not return anything while print() return value(1).
  2. echo is a statement that is used to display the output it can be used with parentheses or without parentheses.
  3. echo can pass multiple string but, print can not pass multiple string.
  4. echo is faster  than print.

 

 

What is $ v/s $$ in PHP
How to turn On rewrite module in WampServer