Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

What's the difference between "print" and "echo" in PHP?

user-image
Question added by Deleted user
Date Posted: 2017/06/14
jogamaya routray
by jogamaya routray , Project Manager , skill avenue Pvt. Ltd

Both echo and print are used for print. Both are same But Echo is more faster than print. Echo has no return value where print has return value one. Echo can take multiple parameters but print can take one argument.

waleed hassan
by waleed hassan , FullStack Web Developer , Falconcity of Wonders

echo and print are more or less the same. They are both used to output data to the screen. The differences are small: echo has no return value while print has a return value of 1 so it can be used in expressions. echo can take multiple parameters (although such usage is rare) while print can take one argument.

Subin P Vasu
by Subin P Vasu , Google AdWords API Developer, Google AdWords Manager, PHP Developer , Freelance

Echo never return the printed value but print do.

Omar Elhamy
by Omar Elhamy , Junior .Net Developer , MDC

echo and print are the same. They are both used to output data to the screen. but echo has no return value while print has a return value of 1 so it can be used in expressions. aslo print takes only one param, while echo has multiple params.

Muhammad Shahzad Kanwal
by Muhammad Shahzad Kanwal , Website Developer & Designer , SE Software Technologies Multan

echo and print are same,both are used to output ,The differences are small echo has no return  print only takes one parameter, while echo can have multiple parameters.print returns a value (1), so can be used as an expression. echo is slightly faster

Rohit Kumar
by Rohit Kumar , web Develoer , zombiesoftwares

Echo and Print both are use to print but print take only one parameter but echo take multiple parameter.Echo has no return type but print has a return type like1.

kranthi kiran
by kranthi kiran , SDET (software development engineer in test) , simplilearn solutions pvt ltd

both are used to display result on screen, but print return value is 1 whereas echo return value is 0 and also print can take only one arguement

Amina BOUMAZA
by Amina BOUMAZA , SQL Server Database Administrator , commune sidi bel abbes

echo and print are more or less the same. They are both used to output data to the screen.

echo and print echo is more faster then print

echo has no return value while print has a return value of 1 

echo can take multiple parameters while print can take one argument.

Man-zoo So-zoo
by Man-zoo So-zoo , Senior Developer , Medium Heath-care and Multipurpose Pvt. Ltd.

The main difference between print and echo is print only accepts single parameter and return the single one only.

Syed Muhammad Kawish
by Syed Muhammad Kawish , Web Developer , Icon Global Pvt Ltd

Simple , they are more or less same but echo is fater and echo can take multiple arguments whereas print can take only one argumennt.

"echo" has no retrun value. "print" always returns 1. "print" cannot pass multiple arguments. "echo" can.

More Questions Like This