What is the difference between echo and print?

Options
- They both behave the same.
- Print can take multiple parameters where as echo cannot
- Echo can take multiple parameters where as print cannot
- Print is a function where as echo is not.


CORRECT ANSWER : Echo can take multiple parameters where as print cannot

Discussion Board
Correct Answer

answer is both c and d

Lakshmi 05-29-2017 08:30 AM

php

i m fresher & i was learn php


kuldeep sharma 10-4-2015 10:27 AM

Echo vs Print.

Answer : Echo can take multiple parameters where as print cannot.

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 while print can take one argument.

IamJay 02-10-2015 01:07 AM

echo vs print

echo accepts multiple arguments. So you may write echo $a, $b instead of echo $a . $b. The former one will be faster, because the strings are echoed directly, without the necessity of first copying them to a new chunk of memory.

print has a return value, echo doesn't. Therefore print is slightly slower but may be used in function context.

echo vs print 09-11-2014 12:37 AM

php

how can echo take multiple parameters

balu 09-10-2014 11:43 AM

Correct Answer

the correct answer is:
Print is a function where as echo is not

????

Jeni 05-8-2014 04:10 AM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement