[wp-trac] [WordPress Trac] #55603: PHP 8.2: address deprecation of the utf8_encode() and utf8_decode() functions

WordPress Trac noreply at wordpress.org
Wed Feb 28 01:51:35 UTC 2024


#55603: PHP 8.2: address deprecation of the utf8_encode() and utf8_decode()
functions
--------------------------------------------+------------------------------
 Reporter:  jrf                             |       Owner:  hellofromTonya
     Type:  task (blessed)                  |      Status:  assigned
 Priority:  normal                          |   Milestone:  6.5
Component:  General                         |     Version:  6.0
 Severity:  normal                          |  Resolution:
 Keywords:  2nd-opinion php82 dev-feedback  |     Focuses:  coding-
                                            |  standards
--------------------------------------------+------------------------------

Comment (by dd32):

 Replying to [comment:55 swissspidy]:
 > Don‘t we collect that data via the updates API? cc dd32

 We do, as of WordPress 6.1. I know for a fact that `mbstring` was less
 common with PHP5.x based on historical php extension investigations.

 The current numbers for `mbstring` are `99.44%` and `99.70%` for `iconv`.
 An intersection of `99.98%` has both.

 Keep in mind that the site counts for a `0.5%` is not insignificant.

 If adding a polyfill is minimal (for either these utf8 functions, or
 mbstring), that's the route I'd personally vote for, just as it avoids
 adding an extra requirement for a non-technical user to understand.

 Once PHP 8 or 9 is the WP minimum, the extension usage may have changed
 significantly, leading to any polyfil being able to be removed; so it
 wouldn't be adding a forever unused code branch.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55603#comment:62>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list