File tree Expand file tree Collapse file tree 2 files changed +14
-8
lines changed Expand file tree Collapse file tree 2 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,11 @@ if (!extension_loaded('bcmath')) die('skip bcmath extension is not available');
6
6
?>
7
7
--FILE--
8
8
<?php
9
- var_dump (bcpow ('1 ' , '1.1 ' , 2 ));
9
+ try {
10
+ var_dump (bcpow ('1 ' , '1.1 ' , 2 ));
11
+ } catch (\ValueError $ e ) {
12
+ echo $ e ->getMessage () . \PHP_EOL ;
13
+ }
10
14
?>
11
- --EXPECTF--
12
- Warning: bcpow(): Non-zero scale in exponent in %s on line %d
13
- string(4) "1.00"
15
+ --EXPECT--
16
+ bcpow(): Argument #2 ($exponent) must be an integer
Original file line number Diff line number Diff line change @@ -6,8 +6,11 @@ if (!extension_loaded('bcmath')) die('skip bcmath extension is not available');
6
6
?>
7
7
--FILE--
8
8
<?php
9
- var_dump (bcpow ('0 ' , '9223372036854775808 ' , 2 ));
9
+ try {
10
+ var_dump (bcpow ('0 ' , '9223372036854775808 ' , 2 ));
11
+ } catch (\ValueError $ e ) {
12
+ echo $ e ->getMessage () . \PHP_EOL ;
13
+ }
10
14
?>
11
- --EXPECTF--
12
- Warning: bcpow(): Exponent too large in %s on line %d
13
- string(4) "1.00"
15
+ --EXPECT--
16
+ bcpow(): Argument #2 ($exponent) is too large
You can’t perform that action at this time.
0 commit comments