max() Function Combined with Array Mapping (array_map) Best Practices: How to Improve Efficiency?
The key to optimization lies in this: if you only need the maximum value and not the full mapping result, the logic can be executed in a single loop.
max