adplus-dvertising
frame-decoration

Question

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

a.

Error

b.

0

c.

42

d.

84

Posted under Functions in PHP PHP

Answer: (a).Error

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What will be the output of the following PHP code ?

Similar Questions

Discover Related MCQs