Closed
Description
Description
The following code:
<?php
echo gmp_pow(64, 11);
Resulted in this output:
Fatal error: Uncaught ValueError: base and exponent overflow in Command line code:1
Stack trace:
#0 Command line code(1): gmp_pow(64, 11)
#1 {main}
thrown in Command line code on line 1
But I expected this output instead:
73786976294838206464
Not sure why the overflow triggered here, the resulting output is not particularly large (for GMP). Performing the same calculation by using gmp_mul() repeatedly does not cause an overflow exception.
PHP Version
PHP 8.3.14
Operating System
Arch Linux 6.11.6