array_sum() Checks Operands Thoroughly
array_sum() used to cast the arguments to integers before executing the additions. Nowadays, the strange types raise a warning, as illustrated here with the array.
PHP code
<?php
print array_sum([1, false, []]);
?>
Before
1
After
PHP Warning: array_sum(): Addition is not supported on type array
Warning: array_sum(): Addition is not supported on type array
1
PHP version change
This behavior changed in 8.3.