Title: Incompatible with php8
Last modified: February 18, 2022

---

# Incompatible with php8

 *  [WebmasterVPU](https://wordpress.org/support/users/webmastervpu/)
 * (@webmastervpu)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/incompatible-with-php8/)
 * Since upgrading my servers to PHP8, trying to open the health check details site
   will create the following error:
 *     ```
       Uncaught TypeError: preg_match(): Argument #2 ($subject) must be of type string, array given in /home/.sites/768/site4/web/wp2016/wp-content/plugins/amp/src/Admin/SiteHealth.php:548
       Stack trace:
       #0 /home/.sites/768/site4/web/wp2016/wp-content/plugins/amp/src/Admin/SiteHealth.php(548): preg_match('/max-age=[1-9]/', Array)
       #1 /home/.sites/768/site4/web/wp2016/wp-content/plugins/amp/src/Admin/SiteHealth.php(634): AmpProject\AmpWP\Admin\SiteHealth::AmpProject\AmpWP\Admin\{closure}(Array)
       #2 /home/.sites/768/site4/web/wp2016/wp-content/plugins/amp/src/Admin/SiteHealth.php(491): AmpProject\AmpWP\Admin\SiteHealth->check_for_page_caching()
       #3 /home/.sites/768/site4/web/wp2016/wp-content/plugins/amp/src/Admin/SiteHealth.php(249): AmpProject\AmpWP\Admin\SiteHealth->get_page_cache_detail(true)
       #4 /home/.sites/768/site4/web/wp2016/wp-content/plugins/health-check/includes/class-health-check.php(321): AmpProject\AmpWP\Admin\SiteHealth->persistent_object_cache()
       #5 /home/.sites/768/site4/web/wp2016/wp-includes/class-wp-hook.php(307): Health_Check->enqueues('tools_page_heal...')
       #6 /home/.sites/768/site4/web/wp2016/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
       #7 /home/.sites/768/site4/web/wp2016/wp-includes/plugin.php(474): WP_Hook->do_action(Array)
       #8 /home/.sites/768/site4/web/wp2016/wp-admin/admin-header.php(118): do_action('admin_enqueue_s...', 'tools_page_heal...')
       #9 /home/.sites/768/site4/web/wp2016/wp-admin/admin.php(239): require_once('/home/.sites/76...')
       #10 /home/.sites/768/site4/web/wp2016/wp-admin/tools.php(40): require_once('/home/.sites/76...')
       #11 {main}
         thrown
       ```
   
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fincompatible-with-php8%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  [The-Dude](https://wordpress.org/support/users/the-dude-1/)
 * (@the-dude-1)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/incompatible-with-php8/#post-15477221)
 * Maybe this plugin is dead. No response to moste of the questions and no changes
   since 8 months …

Viewing 1 replies (of 1 total)

The topic ‘Incompatible with php8’ is closed to new replies.

 * ![](https://ps.w.org/health-check/assets/icon.svg?rev=1828244)
 * [Health Check & Troubleshooting](https://wordpress.org/plugins/health-check/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/health-check/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/health-check/)
 * [Active Topics](https://wordpress.org/support/plugin/health-check/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/health-check/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/health-check/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [The-Dude](https://wordpress.org/support/users/the-dude-1/)
 * Last activity: [4 years, 2 months ago](https://wordpress.org/support/topic/incompatible-with-php8/#post-15477221)
 * Status: not resolved