Php | Beats 100% Runtime and memory
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n\n    /**\n     * @param String $s\n     * @param String $t\n     * @param Integer $maxCost\n     * @return Integer\n     */\n    function equalSubstring($s, $t, $maxCost) {\n        $left = $currCost = $ans = 0;\n        for ($i = 0; $i < strlen($s); $i++) {\n            $currCost += abs(ord($s[$i]) - ord($t[$i]));\n            while($currCost > $maxCost) {\n                $currCost -= abs(ord($s[$left]) - ord($t[$left]));\n                $left++;\n            }\n            $ans = max($ans, $i - $left + 1);\n        }\n        return $ans;\n    }\n}\n```
['PHP']