File size: 381 Bytes
1e94262 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | --TEST--
bcadd() requires well-formed values
--EXTENSIONS--
bcmath
--FILE--
<?php
try {
bcadd('a', '1');
} catch (\ValueError $e) {
echo $e->getMessage() . PHP_EOL;
}
try {
bcadd('1', 'a');
} catch (\ValueError $e) {
echo $e->getMessage() . PHP_EOL;
}
?>
--EXPECT--
bcadd(): Argument #1 ($num1) is not well-formed
bcadd(): Argument #2 ($num2) is not well-formed
|