ExamVeda
Login
Home
This question belongs to PHP Functions
Functions
?

What will be the output of the following PHP code ?
<?php
function mine($num)
{
    $num = 2 + $num;
    echo "$num";
}
mine(3);
?>

Answer & Solution
Correct Answer: Option B
The function is defined as echo “$num”.This means $num is treated as a string and not as a variable.
Examveda
Question posted by Examveda
Community

Join the Discussion

1 Comment
Raham Sher
Raham Sher 7 years ago
Its result will be 5.Kindly check & verify.I myself checked & verify it.