What PHP 8.0 changes for WordPress plugins
These are the functions, constants and settings that PHP 8.0 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.
Removed
get_magic_quotes_gpc(),get_magic_quotes_runtime(). Magic quotes no longer exist. Remove the call.image2wbmp(),png2wbmp(),jpeg2wbmp(). Use imagewbmp().ldap_sort(),ldap_control_paged_result(),ldap_control_paged_result_response(). Use the controls argument of ldap_search().mbregex_encoding()and 13 more. Use the mb_ereg functions with the mb_ prefix.mbregex_encoding(),mbereg(),mberegi(),mbereg_replace(),mberegi_replace(),mbsplit(),mbereg_match(),mbereg_search(),mbereg_search_pos(),mbereg_search_regs(),mbereg_search_init(),mbereg_search_getregs(),mbereg_search_getpos(),mbereg_search_setpos()create_function(). Use an anonymous function.each(). Use foreach, or key() and current().money_format(). Use NumberFormatter::formatCurrency() or number_format().restore_include_path(). Use ini_restore( 'include_path' ).hebrevc(). Use nl2br( hebrev() ).convert_cyr_string(). Use mb_convert_encoding() or iconv().ezmlm_hash(). No replacement.fgetss(). Use strip_tags( fgets() ).gzgetss(). Use strip_tags( gzgets() ).read_exif_data(). Use exif_read_data().gmp_random(). Use gmp_random_bits() or gmp_random_range().INTL_IDNA_VARIANT_2003,MB_OVERLOAD_MAIL,MB_OVERLOAD_STRING,MB_OVERLOAD_REGEX,FILTER_FLAG_SCHEME_REQUIRED,FILTER_FLAG_HOST_REQUIRED,FILTER_SANITIZE_MAGIC_QUOTES,INPUT_REQUEST,INPUT_SESSION,ASSERT_QUIET_EVAL. The constant no longer exists.$php_errormsg. Use error_get_last().track_errors,mbstring.func_overload,magic_quotes_gpc,magic_quotes_runtime,magic_quotes_sybase,safe_mode,register_globals. The setting no longer exists.
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.