πŸ“Š PHP
Q. What will be the output of the following PHP code?

Code:
<?php
function Increment(){
    static $num = 0;
    echo "$num";
    $num++;
}

Increment();
Increment();
Increment();
?>
  • (A) 000
  • (B) 111
  • (C) 011
  • (D) 012
πŸ’¬ Discuss
βœ… Correct Answer: (D) 012

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
141247
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
82%
Success Rate