php-src/ext/bcmath/tests/bug44995.phpt
Christoph M. Becker dea41f3c3a Fixed bug #44995 (bcpowmod() fails if scale != 0)
`bc_divmod()` is supposed to do integer division, so we must not apply
a scale factor here.
2017-09-06 23:30:53 +02:00

17 lines
324 B
PHP

--TEST--
Bug #44995 (bcpowmod() fails if scale != 0)
--SKIPIF--
<?php
if (!extension_loaded('bcmath')) die('skip bcmath extension not available');
?>
--FILE--
<?php
var_dump(bcpowmod('4', '4', '3', 1));
var_dump(bcpowmod('3234', '32345', '22345', 1));
?>
===DONE===
--EXPECT--
string(3) "1.0"
string(7) "17334.0"
===DONE===