What PHP 8.6 changes for WordPress plugins
These are the functions, constants and settings that PHP 8.6 removes, deprecates or no longer ships, with what to use instead. A removed function or constant stops a plugin with a fatal error when that code runs. A deprecated one keeps working and logs a notice.
PHP 8.6 is due on 19 November 2026. This list follows its upgrade notes and can change before the release.
Deprecated
mb_ereg()and 15 more. Use the preg_ functions with the u modifier.mb_ereg(),mb_eregi(),mb_ereg_replace(),mb_eregi_replace(),mb_ereg_replace_callback(),mb_ereg_match(),mb_split(),mb_regex_encoding(),mb_regex_set_options(),mb_ereg_search(),mb_ereg_search_init(),mb_ereg_search_pos(),mb_ereg_search_regs(),mb_ereg_search_getregs(),mb_ereg_search_getpos(),mb_ereg_search_setpos()is_long(),is_integer(). Use is_int().is_double(). Use is_float().doubleval(). Use floatval().spl_object_hash(). Use spl_object_id().spl_classes(). Use ReflectionExtension::getClassNames().strcoll(). Use Collator::compare().metaphone(). Use a phonetic matching library.mysqli_get_charset(). Use mysqli_character_set_name().mysqli_stmt_init(). Use mysqli_prepare().SORT_LOCALE_STRING. Use Collator::sort() or Collator::asort().
Bumpcheck also checks syntax changes, such as array offsets with curly braces and constructors named after their class. The full list is on the plugin page.