mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00

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.
23 lines
386 B
PHP
23 lines
386 B
PHP
--TEST--
|
|
bccomp() requires well-formed values
|
|
--EXTENSIONS--
|
|
bcmath
|
|
--FILE--
|
|
<?php
|
|
|
|
try {
|
|
bccomp('a', '1');
|
|
} catch (\ValueError $e) {
|
|
echo $e->getMessage() . PHP_EOL;
|
|
}
|
|
|
|
try {
|
|
bccomp('1', 'a');
|
|
} catch (\ValueError $e) {
|
|
echo $e->getMessage() . PHP_EOL;
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
bccomp(): Argument #1 ($num1) is not well-formed
|
|
bccomp(): Argument #2 ($num2) is not well-formed
|