Q. What will be the output?

Code:
$a = [1,2,3];
echo array_push($a, 4);
  • (A) 4
  • (B) 3
  • (C) Error
  • (D) 1
πŸ’¬ Discuss
βœ… Correct Answer: (A) 4
Explanation: array_push returns new array length.
Explanation by: Roshan
array_push returns new array length.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
18
Total Visits
πŸ“½οΈ
4 mo ago
Published
πŸŽ–οΈ
Roshan
Publisher
πŸ“ˆ
81%
Success Rate