Re: Deprecate declare(encoding='...') + zend.multibyte + zend.script_encoding + zend.detect_unicode ?
| From: | youkidearitai | Date: | Wed, 29 Nov 2023 00:18:19 +0000 |
| Subject: | Re: Deprecate declare(encoding='...') + zend.multibyte + zend.script_encoding + zend.detect_unicode ? | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-121840@lists.php.net to get a copy of this message | ||
2023年11月29日(水) 9:04 Hans Henrik Bergan <divinity76@gmail.com>:
>
> Do you have access to a project actually using Shift_JIS? Interesting!
> I thought they were practically unicorns / non-existent running PHP4,
>
> Can you run
> ```
> var_dump(array(
> "biao_hex" => bin2hex("表"),
> "zend.multibyte" => ini_get("zend.multibyte"),
> "zend.script_encoding" => ini_get("zend.script_encoding"),
> "zend.detect_unicode" => ini_get("zend.detect_unicode"),
> "mbstring.internal_encoding" =>
> ini_get("mbstring.internal_encoding"),
> "mbstring.func_overload" => ini_get("mbstring.func_overload"),
> "PHP_VERSION" => PHP_VERSION,
> ));
> ```
Hi, Hans
I'm trying to above code.
Nothing config:
❯ ~/php82/bin/php deprecate_zend_scriptencoding.php
PHP Parse error: syntax error, unexpected identifier "zend",
expecting ")" in
/Users/youkidearitai/deprecate_zend_scriptencoding.php on line 5
Parse error: syntax error, unexpected identifier "zend", expecting ")"
in /Users/youkidearitai/deprecate_zend_scriptencoding.php on line 5
Use zend.script_encoding=sjis and zend_bultibyte=true
❯ ~/php82/bin/php -d zend.script_encoding=sjis -d zend.multibyte=true
deprecate_zend_scriptencoding.php
array(7) {
["biao_hex"]=>
string(6) "e8a1a8"
["zend.multibyte"]=>
string(1) "1"
["zend.script_encoding"]=>
string(4) "sjis"
["zend.detect_unicode"]=>
string(1) "1"
["mbstring.internal_encoding"]=>
string(0) ""
["mbstring.func_overload"]=>
bool(false)
["PHP_VERSION"]=>
string(5) "8.2.8"
}
Therefore, zend.script_encoding and zend.multibyte is very important.
Regards
Yuya
--
---------------------------
Yuya Hamada (tekimen)
- https://tekitoh-memdhoi.info
- https://github.com/youkidearitai
-----------------------------