How do I find the sum of all the digits in a number in PHP?
If interested with regex:
array_sum(preg_split("//", $number));