Files
php-src/ext/bcmath/tests/bcpow_error3.phpt
Max Semenik 56f90492d6 Migrate skip checks to --EXTENSIONS--, p1
For rationale, see https://github.com/php/php-src/pull/6787

Extensions migrated in this part:
* bcmath
* bz2
* calendar
* com_dotnet
* ctype

Closes GH-6797.
2021-03-22 17:51:02 +01:00

24 lines
384 B
PHP

--TEST--
bcpow() requires well-formed values
--EXTENSIONS--
bcmath
--FILE--
<?php
try {
bcpow('a', '1');
} catch (\ValueError $e) {
echo $e->getMessage() . PHP_EOL;
}
try {
bcpow('1', 'a');
} catch (\ValueError $e) {
echo $e->getMessage() . PHP_EOL;
}
?>
--EXPECT--
bcpow(): Argument #1 ($num) is not well-formed
bcpow(): Argument #2 ($exponent) is not well-formed