PHP array_reduce() FunctionLast Updated : 17 Mar 2025 The array_reduce() function is a inbuilt function of PHP. The array_reduce( ) function is used to reduce the array to a single value using a callback function. This function was introduced in PHP 4.0.5. SyntaxParameter
Return typeThe array_reduce( ) function returns the reduced result. It can be of any type int, float or string. Example 1Output: 6-PHP-java-python Example 2Output: 21 Example 3Output: start and 15 and 120 and 45 and 320 Example 4Output: 120000 Next TopicPhp-array-replace-function |
We request you to subscribe our newsletter for upcoming updates.

We deliver comprehensive tutorials, interview question-answers, MCQs, study materials on leading programming languages and web technologies like Data Science, MEAN/MERN full stack development, Python, Java, C++, C, HTML, React, Angular, PHP and much more to support your learning and career growth.
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India