1
0
mirror of https://github.com/php/php-src.git synced 2026-04-02 13:43:02 +02:00
Files
archived-php-src/ext/bcmath/tests/bcpowmod_zero_modulus.phpt
George Peter Banyard cd05b56a6f Promote some warnings in BCMath to Errors
Also do a bit of refactoring at the same time.

Closes GH-6105
2020-09-11 17:40:06 +02:00

17 lines
353 B
PHP

--TEST--
bc_raisemod's mod can't be zero
--CREDITS--
Gabriel Caruso (carusogabriel34@gmail.com)
--SKIPIF--
<?php if(!extension_loaded('bcmath')) die('skip bcmath extension not loaded'); ?>
--FILE--
<?php
try {
var_dump(bcpowmod('1', '1', '0'));
} catch (DivisionByZeroError $ex) {
echo $ex->getMessage(), PHP_EOL;
}
?>
--EXPECT--
Modulo by zero