Extremely easy PHP solution, 4ms, 15MB
\nclass Solution {\n\n    /**\n     * @param Integer $n\n     * @return Integer\n     */\n    function subtractProductAndSum($n) {\n        $arr = str_split ($n
```\nclass Solution {\n\n    /**\n     * @param Integer $n\n     * @return Integer\n     */\n    function subtractProductAndSum($n) {\n        $arr = str_split ($n);\n        return array_product ($arr) - array_sum ($arr);\n    }\n}\n```
['PHP']