polyfill
polyfill copied to clipboard
PHP polyfills
Hi, With the polyfill, `var_dump(mb_strlen(chr(254)))` return `0`. With the php8.0-mbstring extension, var_dump(mb_strlen(chr(254))) return `1`; `versions : * v1.26.0` Thanks, Alex
Fixes #458 Implementaion of `mb_trim`, `mb_ltrim` and `mb_rtrim` Tests from the php-src repository
The same pattern of encoding checks is required in another method, so you can separate encoding assertions and avoid copy-pasting. refs https://github.com/symfony/polyfill/pull/466/files#r1545573878 Cc: @Ayesh
[These errors](https://github.com/symfony/polyfill/actions/runs/8494636417/job/23270054252?pr=471#step:6:1350) below looks strange: ``` 40) Warning Incompatible signature for PHP >= 8: - mb_ucfirst(string $string, ?string $encoding = null): string + mb_ucfirst(string $string, ?string $encoding = null): string...
It is inconsistent whether to call built-in functions or polyfill methods in test cases. refs https://github.com/symfony/polyfill/pull/471/files#r1545524686 I'm also interested in improving these tests, but it looks like I won't be...
Adds a polyfill for the `grapheme_str_split` function added in PHP 8.4. Requires PHP 7.3, because the polyfill is based on `\X` Regex, and it only works properly on PCRE2, which...
If the underlying Curl build supports it, setting the HTTP version should be theoretically possible. The availability of the constants do not guarantee the feature support, so declaring them in...
Can backporting new constant HTTP in 8.4?
This deprecation isn't just for integers that are outside the integer range of -128, 255. https://3v4l.org/PgZ6c