Skip to content

Conversation

@jrfnl
Copy link
Member

@jrfnl jrfnl commented Aug 10, 2020

The commits in this PR line up with the commits in PHP Core to add the functions.

Related to #809


PHP 8.0: NewFunctions: account for new fdiv() function

Added fdiv() function, which performs a floating-point division under
IEEE 754 semantics. Division by zero is considered well-defined and
will return one of Inf, -Inf or NaN.

Refs:

PHP 8.0: NewFunctions: account for new get_debug_type() function

Added get_debug_type() function, which returns a type useful for error
messages. Unlike gettype(), it uses canonical type names, returns class
names for objects, and indicates the resource type for resources.
RFC: https://wiki.php.net/rfc/get_debug_type

Refs:

PHP 8.0: NewFunctions: account for new get_resource_id() function

Added get_resource_id($resource) function, which returns the same value as
(int) $resource. It provides the same functionality under a clearer API.

Refs:

PHP 8.0: NewFunctions: account for new preg_last_error_msg() function

Added preg_last_error_msg(), which returns a human-readable message for
the last PCRE error. It complements preg_last_error(), which returns an
integer enum instead.

Refs:

PHP 8.0: NewFunctions: account for new str_contains() function

Added str_contains($haystack, $needle) function, which checks whether
$haystack contains $needle as a sub-string. It is equivalent to writing
strpos($haystack, $needle) !== false.

Refs:

PHP 8.0: NewFunctions: account for str_starts_with() and str_ends_with() functions

str_starts_with() checks if a string begins with another string and returns a boolean value (true/false) whether it does.
str_ends_with() checks if a string ends with another string and returns a boolean value (true/false) whether it does.

Refs:

PHP 8.0: NewFunctions: account for imagegetinterpolation() function

The function imagegetinterpolation() to get the current interpolation method
has been added.

Refs:

PHP 8.0: NewFunctions: account for new Enchant functions

Add enchant_dict_add and enchant_dict_is_added functions

Refs:

Includes unit test.

PHP 8.0: NewFunctions: account for new LDAP function

Added ldap_count_references(), which returns the number of reference
messages in a search result.

Refs:

Includes unit test.

jrfnl added 9 commits August 10, 2020 22:35
> Added fdiv() function, which performs a floating-point division under
> IEEE 754 semantics. Division by zero is considered well-defined and
> will return one of Inf, -Inf or NaN.

Refs:
* https://github.com/php/php-src/blob/69888c3ff1f2301ead8e37b23ff8481d475e29d2/UPGRADING#L570-L572
* php/php-src@e35bdb4
> Added get_debug_type() function, which returns a type useful for error
> messages. Unlike gettype(), it uses canonical type names, returns class
> names for objects, and indicates the resource type for resources.
> RFC: https://wiki.php.net/rfc/get_debug_type

Refs:
* https://wiki.php.net/rfc/get_debug_type
* php/php-src@ef0e447
> Added preg_last_error_msg(), which returns a human-readable message for
> the last PCRE error. It complements preg_last_error(), which returns an
> integer enum instead.

Refs:
* https://github.com/php/php-src/blob/69888c3ff1f2301ead8e37b23ff8481d475e29d2/UPGRADING#L556-L558
* php/php-src@aa79a22
* php/php-src@03bd433
> Added str_contains($haystack, $needle) function, which checks whether
> $haystack contains $needle as a sub-string. It is equivalent to writing
> strpos($haystack, $needle) !== false.

Refs:
* https://wiki.php.net/rfc/str_contains
* php/php-src@1668ad7
…h() functions

> `str_starts_with()` checks if a string begins with another string and returns a boolean value (true/false) whether it does.
> `str_ends_with()` checks if a string ends with another string and returns a boolean value (true/false) whether it does.

Refs:
* https://wiki.php.net/rfc/add_str_starts_with_and_ends_with_functions
* php/php-src#5300
* php/php-src@31fb6a0
@jrfnl jrfnl added Type: enhancement PR: quick merge PR only contains relatively simple changes PR: ready for review labels Aug 10, 2020
@jrfnl jrfnl added this to the 10.0.0 milestone Aug 10, 2020
@jrfnl jrfnl requested a review from wimg August 10, 2020 21:33
@wimg wimg merged commit fd318d5 into develop Aug 16, 2020
@wimg wimg deleted the php-8.0/newfunctions-x11 branch August 16, 2020 22:32
@jrfnl jrfnl removed PR: quick merge PR only contains relatively simple changes PR: ready for review labels Aug 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants