mb_regex_set_options

FunctionDeprecated in PHP 8.6

Set/Get the default options for mbregex functions.

PHP 5
PHP 7
PHP 8.0
Improved
PHP 8.1
PHP 8.2-8.3
PHP 8.4
PHP 8.5
PHP 8.6
Deprecated

mb_regex_set_options Function synopsis

#[\Deprecated]
mb_regex_set_options(?string $options = null): string

Parameters

$options

OptionalType?stringDefault valuenull

The options to set. This is a string where each character is an option. To set a mode, the mode character must be the last one set, however there can only be set one mode but multiple options.

Return value

Typestring

The previous options. If $options is omitted or null, it returns the string that describes the current options.

Changes to the mb_regex_set_options Function

PHP 8.6

  • Function deprecated

PHP 8.0

  • Return type added: string
  • Parameter type added for parameter #1 ($options): ?string
  • Parameter default value added for position #1 ($options): null
- mb_regex_set_options($options)
+ mb_regex_set_options(?string $options = null): string

mb_regex_set_options Function Availability

PHP VersionAvailability
PHP 8.6Upcoming Release Yes Deprecated
PHP 8.5Supported (Latest) Yes
PHP 8.4Supported Yes
PHP 8.3Security-Fixes Only Yes
PHP 8.2Security-Fixes Only Yes
PHP 8.1Unsupported Yes
PHP 8.0Unsupported Yes
PHP 7.4Unsupported Yes
PHP 7.3Unsupported Yes
PHP 7.2Unsupported Yes
PHP 7.1Unsupported Yes
PHP 7.0Unsupported Yes
PHP 5.6Unsupported Yes
PHP 5.5Unsupported Yes
PHP 5.4Unsupported Yes
PHP 5.3Unsupported Yes