PHP  | simple | 100 mem beat
\n```\nclass Solution\n{\n\n  /\n   * @param string $s\n   * @param int $k\n   \n   * @return String\n   /\n    public function digitSum($s, $k)\n    {\n       
![image](https://assets.leetcode.com/users/images/b511cf0a-1340-4a7b-bdeb-621a8ef0c892_1651145181.9083827.png)\n```\nclass Solution\n{\n\n  /**\n   * @param string $s\n   * @param int $k\n   *\n   * @return String\n   */\n    public function digitSum($s, $k)\n    {\n        if(strlen($s) <= $k) return $s;\n        $chunks = array_chunk(str_split($s), $k);\n\n        $ds = \'\';\n        foreach ($chunks as $chunk) {\n            $ds .= array_sum($chunk);\n        }\n\n        return $this->digitSum($ds, $k);\n    }\n}
['PHP']