dis-bench / src /php /php-src /ext /bcmath /tests /bcdiv_error1.phpt
meddyrat's picture
Replace repository contents with the original corrected artifact
1e94262
Raw History Blame Contribute Delete
557 Bytes
--TEST--
bcdiv — Divide two arbitrary precision numbers
--CREDITS--
TestFest2009
Antoni Torrents
antoni@solucionsinternet.com
--EXTENSIONS--
bcmath
--FILE--
<?php
try {
bcdiv('10.99', '0');
} catch (DivisionByZeroError $ex) {
echo $ex->getMessage(), PHP_EOL;
}
try {
bcdiv('10.99', '0.00');
} catch (DivisionByZeroError $ex) {
echo $ex->getMessage(), PHP_EOL;
}
try {
bcdiv('10.99', '-0.00');
} catch (DivisionByZeroError $ex) {
echo $ex->getMessage(), PHP_EOL;
}
?>
--EXPECT--
Division by zero
Division by zero
Division by zero