πŸ“Š PHP
Q. What will be the output of the following code?
Code:
<?php
function track() 
  {
    static $var = 0;
    $var++;
    echo $var;
  }
    track();
    track();
    track();
?>
  • (A) 000
  • (B) 010
  • (C) 110
  • (D) 123
πŸ’¬ Discuss
βœ… Correct Answer: (D) 123

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
161
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Neha Sharma
Publisher
πŸ“ˆ
97%
Success Rate