Difference among echo, print and printf.



Difference among echo, print and printf...

Answer / amit kumar gaur

echo is the primitive of them and just output the content,
you can pass the multiple parameter.
<? php echo 'Welcome','to','india';?>

print is a construct(parentheses are optional)but it return
true and false,print does not the miultiple parameters.

printf is a function not a construct and allow advantage
formatted output.

echo is faster than others.

Is This Answer Correct ?    6 Yes 1 No

Post New Answer

More PHP Interview Questions

What are the functions to be used to get the image's properties (size, width and height)?

0 Answers  


armstrong number by using php while number is given by the keyboard.?

0 Answers  


How to retrieve values out of an array?

0 Answers  


What is php7?

0 Answers  


Tell me how comparison of objects is done in php5?

0 Answers  






What is php namespace?

0 Answers  


Which php framework is in demand?

0 Answers  


WWhat is the functionality of md5 function in PHP?

7 Answers   Tech Mahindra,


Explain the advantages of using PHP?

0 Answers  


what is this error "Call to unsupported or undefined function mysql_connect();" and when you will get this?

2 Answers  


Is php front end?

0 Answers  


What is the difference between substr() and strstr()?

0 Answers  


Categories