-
Notifications
You must be signed in to change notification settings - Fork 550
Fix GMP::toNumber #4867
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
base: 2.1.x
Are you sure you want to change the base?
Fix GMP::toNumber #4867
Conversation
|
this seems to also affect phpstan/phpstan#12123 in which ondrej suggested to use a operator overloading extension. |
| @@ -0,0 +1,34 @@ | |||
| <?php declare(strict_types = 1); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue 13775 also talks about array_sum which is not yet covered in tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
in phpstan/phpstan#13775 (comment) there is a php version difference mentioned. should this also be taken into account here? |
| var_dump(array_sum(['5.5', false, true, new \SimpleXMLElement('<a>7.7</a>'), 5, 5.5, null])); | ||
| var_dump(array_product(['5.5', false, true, new \SimpleXMLElement('<a>7.7</a>'), 5, 5.5, null])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wasn't a valid usage, see
https://3v4l.org/GNJiY#v8.2.30
The SimpleXMLElement is silently ignored
Closes phpstan/phpstan#13775
(In my understanding
Closes phpstan/phpstan#12123