Skip to content

Accept GMP|string|int union in GMP functions #6139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

nikic
Copy link
Member

@nikic nikic commented Sep 16, 2020

This changes GMP functions to accept a GMP|string|int union with standard semantics (and thus also uses it in function signatures).

Relative to the previous behavior, this means that GMP functions in weak mode now also accept float and null (con), and in strict mode no longer accept bool (pro), and have full type information (pro).

@kocsismate What do you think about this?

@kocsismate
Copy link
Member

kocsismate commented Sep 16, 2020

@nikic I think it's a totally reasonable change, and IMO the pros outweigh the cons :) Especially, because I wouldn't expect people using strict mode to pass bool values to these functions, so the BC impact should also be negligible.

@php-pulls php-pulls closed this in 0286dec Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants