PHP Interview questions


Total available count: 33
Subject - PHP Frameworks
Subsubject - PHP

What are the differences between echo and print in PHP?

There are some differences between echo and print

echo: It can output one or more strings. echo is marginally faster compared to print as echo does not return any value.

Example:

<?php
echo "print echo";
?>

print: It can only output one string, and returns always 1.

Example:

<?php
print "print print";
?>

 




Next 5 interview question(s)

1
How to execute a PHP script using command line?
2
What is the difference between include and require?
3
Who is father of PHP?
4
What are the different types of errors in PHP?
5
Explain about include(), require(), include_once() and require_once() ?