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
Does php have future?
How to create connection in php?
What is php programming used for?
How to remove duplicate values from a PHP Array?
What is the difference between exception::getmessage and exception::getline?
What is the difference between super () and this ()?
What is difference between array_merge and array_combine?
What is factory pattern in php?
How do I clear my browser session?
Can age be a variable?
Is php 7 backwards compatible?
What is strlen php?
Explain the types of functions for Splitting String?
What are examples of independent and dependent variables?
What is the mysql injection?