dis-bench / src /php /php-src /ext /bcmath /tests /bcpowmod_zero_modulus.phpt
meddyrat's picture
Replace repository contents with the original corrected artifact
1e94262
Raw History Blame Contribute Delete
282 Bytes
--TEST--
bc_raisemod's mod can't be zero
--CREDITS--
Gabriel Caruso (carusogabriel34@gmail.com)
--EXTENSIONS--
bcmath
--FILE--
<?php
try {
var_dump(bcpowmod('1', '1', '0'));
} catch (DivisionByZeroError $ex) {
echo $ex->getMessage(), PHP_EOL;
}
?>
--EXPECT--
Modulo by zero