Title: PHP8
Last modified: December 2, 2021

---

# PHP8

 *  Resolved [grege2](https://wordpress.org/support/users/grege2/)
 * (@grege2)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php8-12/)
 * I did a compatibility check for php8
 * Current version [@6](https://wordpress.org/support/users/6/).3.0@has 8 warnings
   of severity 5 or higher all of them of the same type:
 *     ```
       FILE: php8-plugin-compat/wp-content/plugins/ewww-image-optimizer/vendor/pel/src/PelEntryLong.php
       ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
       FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
       ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        96 | WARNING | Since PHP 7.0, functions inspecting arguments, like func_get_args(), no longer report the original value as passed to a parameter, but will instead provide the current value. The parameter "$tag" was used, and possibly
           |         | changed (by reference), on line 91.
       ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
   
       FILE: php8-plugin-compat/wp-content/plugins/ewww-image-optimizer/vendor/pel/src/PelEntrySShort.php
       ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
       FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
       ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        76 | WARNING | Since PHP 7.0, functions inspecting arguments, like func_get_args(), no longer report the original value as passed to a parameter, but will instead provide the current value. The parameter "$tag" was used, and possibly
           |         | changed (by reference), on line 71.
       ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
   
       FILE: php8-plugin-compat/wp-content/plugins/ewww-image-optimizer/vendor/pel/src/PelEntryByte.php
       ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
       FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
       ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        78 | WARNING | Since PHP 7.0, functions inspecting arguments, like func_get_args(), no longer report the original value as passed to a parameter, but will instead provide the current value. The parameter "$tag" was used, and possibly
           |         | changed (by reference), on line 73.
       ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
   
       FILE: php8-plugin-compat/wp-content/plugins/ewww-image-optimizer/vendor/pel/src/PelEntrySRational.php
       ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
       FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
       ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        80 | WARNING | Since PHP 7.0, functions inspecting arguments, like func_get_args(), no longer report the original value as passed to a parameter, but will instead provide the current value. The parameter "$tag" was used, and possibly
           |         | changed (by reference), on line 74.
       ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
   
       FILE: php8-plugin-compat/wp-content/plugins/ewww-image-optimizer/vendor/pel/src/PelEntryShort.php
       ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
       FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
       ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        97 | WARNING | Since PHP 7.0, functions inspecting arguments, like func_get_args(), no longer report the original value as passed to a parameter, but will instead provide the current value. The parameter "$tag" was used, and possibly
           |         | changed (by reference), on line 92.
       ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
   
       FILE: wp-content/plugins/ewww-image-optimizer/vendor/pel/src/PelEntryRational.php
       ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
       FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
       ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        90 | WARNING | Since PHP 7.0, functions inspecting arguments, like func_get_args(), no longer report the original value as passed to a parameter, but will instead provide the current value. The parameter "$tag" was used, and possibly
           |         | changed (by reference), on line 84.
       ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
   
       FILE: php8-plugin-compat/wp-content/plugins/ewww-image-optimizer/vendor/pel/src/PelEntrySLong.php
       ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
       FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
       ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        78 | WARNING | Since PHP 7.0, functions inspecting arguments, like func_get_args(), no longer report the original value as passed to a parameter, but will instead provide the current value. The parameter "$tag" was used, and possibly
           |         | changed (by reference), on line 73.
       ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
   
       FILE: php8-plugin-compat/wp-content/plugins/ewww-image-optimizer/vendor/pel/src/PelEntrySByte.php
       ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
       FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
       ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        78 | WARNING | Since PHP 7.0, functions inspecting arguments, like func_get_args(), no longer report the original value as passed to a parameter, but will instead provide the current value. The parameter "$tag" was used, and possibly
           |         | changed (by reference), on line 73.
       ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
       ```
   
 * Any plans on fixing them?

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php8-12/#post-15126564)
 * Hi [@grege2](https://wordpress.org/support/users/grege2/)!
    Those errors are 
   all from an external library that we use, so I’ll take a look and see if there
   is an update for that library which resolves them.
 *  Thread Starter [grege2](https://wordpress.org/support/users/grege2/)
 * (@grege2)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php8-12/#post-15140514)
 * Hi [@nosilver4u](https://wordpress.org/support/users/nosilver4u/)!
 * Thank you
 *  Thread Starter [grege2](https://wordpress.org/support/users/grege2/)
 * (@grege2)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/php8-12/#post-15191021)
 * Hi [@nosilver4u](https://wordpress.org/support/users/nosilver4u/)!
 * Are there any updates regarding my request?
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/php8-12/#post-15198604)
 * So far, all I know is that there is a newer release of the PEL library for PHP
   8, but it is not backwards compatible to all the PHP versions we support. There
   is, however, a release right before that one which may solve the PHP 7 issues
   you reported without breaking things for older PHP versions.
    I’ll let you know
   when I have a chance to do some testing with it!
 *  Thread Starter [grege2](https://wordpress.org/support/users/grege2/)
 * (@grege2)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/php8-12/#post-15263056)
 * Hi [@nosilver4u](https://wordpress.org/support/users/nosilver4u/)!
 * Did you maybe find time to do some testing. Are there any updates on this topic.
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/php8-12/#post-15265524)
 * I haven’t yet, but I’m going to work on this today!
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/php8-12/#post-15266815)
 * What tool did you run to get the compatibility results for PHP 8 originally?
 * Nevermind, found the phpcompat lib that the (semi-obsolete) WP plugin uses, and
   discovered I already have it installed as a dependency of something else!
 * Unfortunately, I also found that the same issues show up in the latest version
   of PEL, which is supposed to be compatible with PHP 8. So either they’ve missed
   some things, or it’s a false positive.
 * I’ll dig into the code further tomorrow and see if I can figure out one way or
   another.
    -  This reply was modified 4 years, 4 months ago by [Shane Bishop](https://wordpress.org/support/users/nosilver4u/).
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/php8-12/#post-15269097)
 * Alright, final verdict is that the “issues” reported by the PHP compatibility
   checker are not actual issues.
 * The warning says that the “$tag” parameter has possibly been changed, which could
   lead to unexpected results if one expects to get the original parameter as passed
   to the function.
 * An inspection of the affected code makes it is clear that the $tag parameter 
   never changes (by reference or otherwise).
 * I’ll be including a PEL update in the next release, which passes all tests with
   PHP 8 on my dev site.
 * Additionally, there are at least 10k users running EWWW IO on PHP 8 already. 
   It’s probably closer to 25k, but that’s my conservative estimate. Now that I’ve
   swapped my primary dev site to PHP 8 as well, I would consider PHP 8 safe to 
   use with EWWW IO as of the next release. It’s likely already fine, but I’ll be
   running all my regular tests on PHP 8 during the release process.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘PHP8’ is closed to new replies.

 * ![](https://ps.w.org/ewww-image-optimizer/assets/icon-256x256.png?rev=1582276)
 * [EWWW Image Optimizer](https://wordpress.org/plugins/ewww-image-optimizer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ewww-image-optimizer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ewww-image-optimizer/)
 * [Active Topics](https://wordpress.org/support/plugin/ewww-image-optimizer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ewww-image-optimizer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ewww-image-optimizer/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * Last activity: [4 years, 4 months ago](https://wordpress.org/support/topic/php8-12/#post-15269097)
 * Status: resolved