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

Code:
<?php
for ($b = 0; $b = -5; $b = 1)
{
    print $b;
    if ($b != 2) 
	break;
}
?>
  • (A) 1
  • (B) 2
  • (C) -5
  • (D) Error
πŸ’¬ Discuss
βœ… Correct Answer: (C) -5

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
55288
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Sikhar Chaudhary
Publisher
πŸ“ˆ
80%
Success Rate