History log of /PHP-8.1/ext/mbstring/mbstring.stub.php (Results 1 – 25 of 33)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
Revision tags: php-8.1.7RC1, php-8.1.4RC1, php-8.1.3, php-8.1.2RC1, php-8.1.0, php-7.3.33, php-7.3.32, php-7.3.31
# 8e6e9838 30-Aug-2021 Máté Kocsis

Add support for generating MAY_BE_ARRAY_OF_REF func info flag (#7416)

# fdc60829 26-Aug-2021 Máté Kocsis

Generate optimizer func info from stubs for various extensions (#7409)

ext/hash, ext/iconv, ext/mbstring, ext/xml, ext/zlib

Revision tags: php-7.3.30, php-7.3.29, php-7.3.28
# cad66533 09-Feb-2021 Máté Kocsis

Generate class entries from stubs for ldap, libxml, mbstring and mysqli

Closes GH-6684

Revision tags: php-7.3.27, php-7.3.26, php-7.3.26RC1, php-7.3.25, php-7.3.25RC1, php-7.3.24
# 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.3.24RC1, 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-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-7.3.22
# 3e800e99 24-Aug-2020 Máté Kocsis

Move custom type checks to ZPP

Closes GH-6034

Revision tags: php-7.3.22RC1, 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-7.3.21RC1, php-7.3.20, php-7.3.20RC1, 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

# 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.3.18RC1, php-7.2.30, 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.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.

12