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
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