History log of /PHP-8.0/ext/mbstring/mbstring.stub.php (Results 1 – 25 of 30)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: php-8.0.0, php-7.3.25, php-7.4.13, php-8.0.0RC5, php-7.4.13RC1, php-8.0.0RC4, php-7.3.25RC1, php-7.4.12, php-8.0.0RC3, php-7.3.24, php-8.0.0RC2
# 5582490b 13-Oct-2020 Nikita Popov

Normalize mb_ereg() return value

mb_ereg()/mb_eregi() currently have an inconsistent return value
based on whether the $matches parameter is passed or not:

> Returns the byte le

Normalize mb_ereg() return value

mb_ereg()/mb_eregi() currently have an inconsistent return value
based on whether the $matches parameter is passed or not:

> Returns the byte length of the matched string if a match for
> pattern was found in string, or FALSE if no matches were found
> or an error occurred.
>
> If the optional parameter regs was not passed or the length of
> the matched string is 0, this function returns 1.

Coupling this behavior to the $matches parameter doesn't make sense
-- we know the match length either way, there is no technical
reason to distinguish them. However, returning the match length
is not particularly useful either, especially due to the need to
convert 0-length into 1-length to satisfy "truthy" checks. We
could always return 1, which would kind of match the behavior of
preg_match() -- however, preg_match() actually returns the number
of matches, which is 0 or 1 for preg_match(), while false signals
an error. However, mb_ereg() returns false both for no match and
for an error. This would result in an odd 1|false return value.

The patch canonicalizes mb_ereg() to always return a boolean,
where true indicates a match and false indicates no match or error.
This also matches the behavior of the mb_ereg_match() and
mb_ereg_search() functions.

This fixes the default value integrity violation in PHP 8.

Closes GH-6331.

show more ...


Revision tags: php-7.4.12RC1, php-7.3.24RC1, php-7.2.34, php-8.0.0rc1, php-7.4.11, php-7.3.23
# cafceea7 24-Sep-2020 Nikita Popov

Update mbstring parameter names

Closes GH-6207.


# 94854e0d 20-Sep-2020 Larry Garfield

Standardize mbstring and string on using 'string' as a parameter name.

Closes GH-6171.


Revision tags: php-8.0.0beta4, php-7.4.11RC1, php-7.3.23RC1
# c37a1cd6 10-Sep-2020 Máté Kocsis

Promote a few remaining errors in ext/standard

Closes GH-6110


# 1c81a345 14-Sep-2020 Máté Kocsis

Make mb_send_mail() consistent with mail()

The $additional_headers parameter shouldn't accept null.


Revision tags: php-8.0.0beta3, php-7.4.10, php-7.3.22
# 3e800e99 24-Aug-2020 Máté Kocsis

Move custom type checks to ZPP

Closes GH-6034


Revision tags: php-8.0.0beta2, php-7.3.22RC1, php-7.4.10RC1, php-8.0.0beta1, php-7.4.9, php-7.2.33, php-7.3.21
# 0d330e1a 28-Jul-2020 Máté Kocsis

Add a few missing parameter types in stubs

Related to GH-5627


Revision tags: php-8.0.0alpha3, php-7.4.9RC1, php-7.3.21RC1, php-7.4.8, php-7.2.32, php-8.0.0alpha2, php-7.3.20, php-8.0.0alpha1, php-7.4.8RC1, php-7.3.20RC1, php-7.4.7, php-7.3.19, php-7.4.7RC1, php-7.3.19RC1
# ac0da090 18-May-2020 Máté Kocsis

Fix UNKNOWN default values in ext/mbstring and ext/gd

Closes GH-5598


# 33ddc3bb 21-Jul-2020 Nikita Popov

Fix mb_ereg_search* arg and func info


# 68164f40 12-May-2020 George Peter Banyard

Fix [-Wundef] warning in MBString extension


Revision tags: php-7.4.6, php-7.2.31
# 7dd332f1 03-May-2020 George Peter Banyard

Refactor mb_substitute_character()

Using the new Fast ZPP API for string|int|null

This also fixes Bug #79448 which was too disruptive to fix in PHP 7.x


Revision tags: php-7.4.6RC1, php-7.3.18RC1, php-7.2.30, php-7.4.5, php-7.3.17
# 12ec7a27 08-Apr-2020 George Peter Banyard

Convert if blocks to assertions and adapt stubs accordingly


# 38d93262 08-Apr-2020 Nikita Popov

Update mb_strrpos() stub

We no longer accept the encoding as 3rd param, so we can make this
a proper int argument.


# 21cfa03f 05-Apr-2020 Máté Kocsis

Generate function entries for another batch of extensions

Closes GH-5352


# 1b6f61e7 05-Apr-2020 George Peter Banyard

Promote invalid case mode to ValueError in mb_case_converter

Add assertions to check the return value is not NULL as this indicates a bug.
Add identical assertion to mb_strtoupper and mb

Promote invalid case mode to ValueError in mb_case_converter

Add assertions to check the return value is not NULL as this indicates a bug.
Add identical assertion to mb_strtoupper and mb_strtolower.
This means these functions can't return false anymore, ammend stubs accordingly.

show more ...


# a34e73de 03-Apr-2020 George Peter Banyard

mb_scrub() can't return false anymore

Also drop the intermediary function which was only used here


# 65604687 02-Apr-2020 George Peter Banyard

Refactor mb_substr_count()

Promote empty needle warning to ValueError
Convert if branch into an assertion as if mbfl_substr_count fails this now implies a bug
Thus mb_substr_count()

Refactor mb_substr_count()

Promote empty needle warning to ValueError
Convert if branch into an assertion as if mbfl_substr_count fails this now implies a bug
Thus mb_substr_count() can only return int now, fix stubs accordingly

show more ...


# 165fde9a 02-Apr-2020 George Peter Banyard

Convert if branch to assertion in mb_strlen

This operation should never fail, therefore it's converted to an assertion.
Thus this mb_strlen() can now only return int, fix stubs according

Convert if branch to assertion in mb_strlen

This operation should never fail, therefore it's converted to an assertion.
Thus this mb_strlen() can now only return int, fix stubs accordingly

show more ...


# d44ee911 02-Apr-2020 George Peter Banyard

Promote mb_str_split warning to ValueError

Also add a TODO about documenting this funcion on PHP.net
Convert some checks to assertions as if they don't hold something went wrong during m

Promote mb_str_split warning to ValueError

Also add a TODO about documenting this funcion on PHP.net
Convert some checks to assertions as if they don't hold something went wrong during memory allocation
Due to these changes this function cannot return false anymore, fix stubs accordingly

show more ...


Revision tags: php-7.4.5RC1, php-7.3.17RC1
# 8a2ce27b 30-Mar-2020 Nikita Popov

mb_detect_order(): Use proper array|string argument


# b02b3539 30-Mar-2020 Nikita Popov

mb_check_encoding(): Make var a proper array|string arg


# 50d07ff2 30-Mar-2020 Nikita Popov

mb_detect_encoding(): Use proper array|string parameter

Needed to add support for nullabiltiy in some places.


# bb652369 30-Mar-2020 Nikita Popov

mb_convert_variables(): Make $from an array|string argument


# 0d244227 30-Mar-2020 Nikita Popov

mb_convert_encoding(): Make $input a proper array|string arg


# f24f6cba 30-Mar-2020 Nikita Popov

mb_convert_encoding(): Make $from_encodings a proper array|string arg

Switching to FastZPP, as we don't support this in normal zpp.


12