xref: /PHP-8.3/ext/bcmath/tests/bcpow_error2.phpt (revision ee226128)
1--TEST--
2bcpow() does not support exponents >= 2**63
3--EXTENSIONS--
4bcmath
5--FILE--
6<?php
7try {
8    var_dump(bcpow('0', '9223372036854775808', 2));
9} catch (\ValueError $e) {
10    echo $e->getMessage() . \PHP_EOL;
11}
12
13try {
14    var_dump(bcpow('0', '-9223372036854775808', 2));
15} catch (\ValueError $e) {
16    echo $e->getMessage() . \PHP_EOL;
17}
18?>
19--EXPECT--
20bcpow(): Argument #2 ($exponent) is too large
21bcpow(): Argument #2 ($exponent) is too large
22