• HOME
  • QUIZ
  • CONTACT US
EXAMIANS
  • COMPUTER
  • CURRENT AFFAIRS
  • ENGINEERING
    • Chemical Engineering
    • Civil Engineering
    • Computer Engineering
    • Electrical Engineering
    • Mechanical Engineering
  • ENGLISH GRAMMAR
  • GK
  • GUJARATI MCQ

PHP Functions

PHP Functions
What will be the output of the following PHP code ?
function calc($num1, $num2)
{
$total = $num1 * $num2;
}
$result = calc(42, 0);
echo $result;

Error
42
0
84

ANSWER DOWNLOAD EXAMIANS APP

PHP Functions
What will be the output of the following PHP code ?
function TV($string) {
echo "my favourite TV show is ".$string;
function b() {
echo " I am here to spoil this code";
}
}
b();

None of the mentioned
My favourite TV show isI am here to spoil this code
Error
I am here to spoil this code

ANSWER DOWNLOAD EXAMIANS APP

PHP Functions
What will be the output of the following PHP code?
define("GREETING","Hello you! How are you today?");
echo constant("GREETING");

GREETING
Hello you! How are you today?
GREETING, Hello you! How are you today?
“GREETING”,”Hello you! How are you today?”

ANSWER DOWNLOAD EXAMIANS APP

PHP Functions
What will be the output of the following PHP code ?
function mine($m)
{if ($m < 0)
echo "less than 0";
if ($ >= 0)
echo "Not True";
}
mine(0);

Not True
No Output
None of the Mentioned
Less Than 0

ANSWER DOWNLOAD EXAMIANS APP

PHP Functions
What will be the output of the following PHP code ?
function time($string)
{
echo strtr("Towe Pa55", "ow5", $string);
}
time("ims");

Towe Pa55
Towe Pass
Time Pass
Time Pa55

ANSWER DOWNLOAD EXAMIANS APP

PHP Functions
What will be the output of the following PHP code?
function sum($num1, $num2) {
$total = $num1 + $num2;
echo "chr($total)";
}
$var1 = "sum";
$var1(5, 44);

49
1
Sum
Error

ANSWER DOWNLOAD EXAMIANS APP
MORE MCQ ON PHP Functions

DOWNLOAD APP

  • APPLE
    from app store
  • ANDROID
    from play store

SEARCH

LOGIN HERE


  • GOOGLE

FIND US

  • 1.70K
    FOLLOW US
  • EXAMIANSSTUDY FOR YOUR DREAMS.
  • SUPPORT :SUPPORT EMAIL ACCOUNT : examians@yahoo.com

OTHER WEBSITES

  • GUJARATI MCQ
  • ACCOUNTIANS

QUICK LINKS

  • HOME
  • QUIZ
  • PRIVACY POLICY
  • DISCLAIMER
  • TERMS & CONDITIONS
  • CONTACT US
↑