Echo and print Statements in PHP

There are two types statement in PHP by which we can generate output, one is echo and another is print.

1. Echo in PHP

What is echo in php : echo is a used to print data in output screen.

It can be used with or without the parenthesis.
Example:

Result:

PHP!
I’m human being!
This is new way to learn many new things.

Result:

2. Print in PHP

What is print in php : print is a used to print data in output screen.

PHP echo and PHP print are doing the same work.

It can also be used with or without parenthesis.

Example:

Result:

PHP!
I’m human being!
This is new way to learn many new things.

3 Echo Vs Print in PHP 

They are exactly same working but they both have some similarity that echo do not have any return value but print have return value 1.

And because of that print can be used in expressions.

Echo is very fast as compared to print. It can take multiple arguments but echo can take only one arguments.