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

Code:
<?php declare(strict_types = 1);

function details(string $name, int $age){
    echo "Name: $name, Age: $age";
}
details("Alvin", "21");
?>
  • (A) Name: Alvin, Age: 21
  • (B) Name: Alvin, Age:
  • (C) Name: Alvin, Age: 0
  • (D) Fatal Error
πŸ’¬ Discuss
βœ… Correct Answer: (D) Fatal Error

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
285
Total Visits
πŸ“½οΈ
5 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
89%
Success Rate