Single Choice
Not Set
QWhat will be the output of the following PHP code?
< ?php
$number = array ("4", "hello", 2);
echo (array_sum ($number));
?>
ID: #2393
Arrays in PHP MCQ
1,193 views
Question Info
#2393Q ID
Not SetDifficulty
Arrays in PHP MCQTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
The array_sum() function add all the values of the input array together, returning the final sum. If a string datatype is found, it’ll be ignored.
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic