What PHP 8.1 changes for WordPress plugins
These are the functions, constants and settings that PHP 8.1 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.
Deprecated
strftime(),gmstrftime(). Use date(), wp_date() or IntlDateFormatter.date_sunrise(),date_sunset(). Use date_sun_info().mhash(),mhash_keygen_s2k(),mhash_count(),mhash_get_block_size(),mhash_get_hash_name(). Use the hash functions.strptime(). Use date_parse_from_format().odbc_result_all(). Build the table from odbc_fetch_array().FILTER_SANITIZE_STRING,FILTER_SANITIZE_STRIPPED. Use sanitize_text_field() or htmlspecialchars().FILE_BINARY,FILE_TEXT. The flag never had an effect. Remove it.auto_detect_line_endings,filter.default. The setting is deprecated.
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.