Typescript Sum All Numbers In Array Function In Php