+ 1

What is the difference between print, echo and return in php ?

26th Apr 2018, 4:47 PM
Rhythm Khandelwal
2 Réponses
+ 5
PHP echo and print Statements. ... 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. echo is marginally faster than print . https://www.w3schools.com/php/php_echo_print.asp
26th Apr 2018, 5:03 PM
Scooby
Scooby - avatar
+ 2
@Rhythm Khandelwal: as stated by Scooby in above comment, its true The differences are small, but echo is widely used,
26th Apr 2018, 5:12 PM
Abdullahi Issack
Abdullahi Issack - avatar