Home »
MCQs »
PHP MCQs
What will be the output of the following PHP code (5)?
31. What will be the output of the following PHP code?
<?php
var_dump (print "Hello");
?>
- Helloint(5)
- Helloint(6)
- Helloint(1)
- Hellonumber(5)
Answer: C) Helloint(1)
Explanation:
In the above PHP script, we used two statements var_dump() and print. The print statement prints the text and returns 1 always and its return type of print statement is int. The var_dump() prints the return type and value. Thus, first "Hello" will be printed and then "int(1)" will be printed. And, the final output will be "Helloint(1)".