Typescript Sum Of All Numbers In Array Function In Php