Skip to content

GMP operator overloading false-positive errors #14288

@Firehed

Description

@Firehed

In reference to #12123 and phpstan/phpstan-src#4867 - it seems as though some of the GMP-related overloading issues were resolved in the release including that path (2.1.40), but others actually expanded in scope, especially if strict mode is enabled.

https://phpstan.org/r/d8777fba-cdd5-4e11-9750-d96b6d460880 is the simplest reproduction of the issue (specific to the code I'm working with), but most of the math/numeric operators are affected. This has been true since PHP 5.6: https://wiki.php.net/rfc/operator_overloading_gmp

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions