ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

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

user-image
تم إضافة السؤال من قبل مستخدم محذوف‎
تاريخ النشر: 2017/06/14
jogamaya routray
من قبل 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
من قبل 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
من قبل Subin P Vasu , Google AdWords API Developer, Google AdWords Manager, PHP Developer , Freelance

Echo never return the printed value but print do.

Omar Elhamy
من قبل 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
من قبل 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
من قبل 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
من قبل 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
من قبل 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
من قبل 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
من قبل 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.

Srikar Suri
من قبل Srikar Suri

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

المزيد من الأسئلة المماثلة