unable to auto detect encoding for C:\Users\admin\AppData\Roaming\Sublime Text 3\Packages\CodeFormatter\codeformatter\lib\phpbeautifier\phpf.phar, using fallback encoding Western (Windows 1252)
Detected ISO-8859-2 vs Western (Windows 1252) with 73% confidence
error: CodeFormatter
Format error:
PHP Deprecated: The each() function is deprecated. This message will be suppressed on further calls in phar://C:/Users/admin/AppData/Roaming/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 11054
Deprecated: The each() function is deprecated. This message will be suppressed on further calls in phar://C:/Users/admin/AppData/Roaming/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 11054
PHP Notice: Trying to access array offset on value of type bool in phar://C:/Users/admin/AppData/Roaming/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 7267
Notice: Trying to access array offset on value of type bool in phar://C:/Users/admin/AppData/Roaming/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 7267
PHP Deprecated: strrchr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in phar://C:/Users/admin/AppData/Roaming/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 12211
Deprecated: strrchr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in phar://C:/Users/admin/AppData/Roaming/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 12211
PHP Deprecated: strrchr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in phar://C:/Users/admin/AppData/Roaming/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 12211
Deprecated: strrchr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in phar://C:/Users/admin/AppData/Roaming/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 12211
PHP Deprecated: strrchr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in phar://C:/Users/admin/AppData/Roaming/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 12211
Deprecated: strrchr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in phar://C:/Users/admin/AppData/Roaming/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 12211
PHP Deprecated: strrchr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in phar://C:/Users/admin/AppData/Roaming/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 12211
Deprecated: strrchr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in phar://C:/Users/admin/AppData/Roaming/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 12211
PHP Deprecated: strrchr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in phar://C:/Users/admin/AppData/Roaming/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 12211
Deprecated: strrchr(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in phar://C:/Users/admin/AppData/Roaming/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar/phpf.php on line 12211
原因是自从php7.2之后就废弃了each方法,我的php版本是7.4,所以有两个办法。
1.安装个php7.2以下的版本
2.使用其语法检测器
https://github.com/akalongman/sublimetext-codeformatter/issues/355