Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

utf8_encode-deprecation in PHP 8.2 #201

Open
alexgit2k opened this issue Jan 26, 2024 · 0 comments
Open

utf8_encode-deprecation in PHP 8.2 #201

alexgit2k opened this issue Jan 26, 2024 · 0 comments

Comments

@alexgit2k
Copy link

What is this feature about (expected vs actual behaviour)?

Portable UTF-8 is using utf8_encode which is deprecated in PHP 8.2 and should be replaced: https://php.watch/versions/8.2/utf8_encode-utf8_decode-deprecated

/** @noinspection PhpUsageOfSilenceOperatorInspection | TODO for PHP > 8.2: find a replacement for this */
/** @var false|string $str - the polyfill maybe return false */
$str = @\utf8_encode($str);

Does it take minutes, hours or days to fix?

Minutes. Replacement-functions for utf8_encode are listed here: https://php.watch/versions/8.2/utf8_encode-utf8_decode-deprecated#utf8_encode-replace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant