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

Code:
<?php
    function calc($num1, $num2)
    {
        $total = $num1 * $num2; 
    }
    $result = calc(42, 0);
    echo $result;    
?>
  • (A) 84
  • (B) 0
  • (C) Error
  • (D) 42
πŸ’¬ Discuss
βœ… Correct Answer: (C) Error

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
201
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Yogesh
Publisher
πŸ“ˆ
88%
Success Rate