Q. What will be the output?

Code:
$x = 5;
echo ++$x;
  • (A) 5
  • (B) 6
  • (C) Error
  • (D) 1
πŸ’¬ Discuss
βœ… Correct Answer: (B) 6
Explanation: Pre-increment increments first, then returns value.
Explanation by: Roshan
Pre-increment increments first, then returns value.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
30
Total Visits
πŸ“½οΈ
5 mo ago
Published
πŸŽ–οΈ
Roshan
Publisher
πŸ“ˆ
80%
Success Rate