What is the Diff. Between echo() and Print() in PHP?
Answer Posted / satyajit das
1> print()is am method which returns boolean parameter(s)
either 1 or 0. Where echo() is an object rather statement
which does not have any return parameter in spite of has
its functionality.
2> According to print is structured and faster in sence it
does not return any complex parameter but if the complex
parameter is concerned echo becomes slow. complex parameter
indicates any complex value like 1.3e^2.
3> print supports multiple arguements w.r.t. '.' like echo
e.g.
<?php
$p = "MY ISAM";
$j = 1;
print($p." ".$j);
echo("<br>".$p.$j);
?>
| Is This Answer Correct ? | 20 Yes | 23 No |
Post New Answer View All Answers
What is putenv?
What is traits? How it is used in php?
Does php have block scope?
Tell me what type of operation is needed when passing values through a form or an url?
What is the difference between characters 34 and x34?
What is in php 7?
Why do we use inheritance in php?
How to get the IP address of the client/user in PHP?
What are the new features in php 7?
Can the value of a constant change during the script's execution?
What does $_env mean?
What does csrf token mean?
What is the difference between array_merge() and array_merge_recursive() in php?
What are static variables in php?
Write down the code for save an uploaded file using php?