mirror of
https://github.com/php/php-src.git
synced 2026-04-14 03:22:58 +02:00
We can not modify result since it can be copy of _zero_ or _one_, etc. and "copy" in bcmath is just bumping the refcount.
14 lines
325 B
PHP
14 lines
325 B
PHP
--TEST--
|
|
Bug 72093: bcpowmod accepts negative scale and corrupts _one_ definition
|
|
--SKIPIF--
|
|
<?php if(!extension_loaded("bcmath")) print "skip"; ?>
|
|
--FILE--
|
|
<?php
|
|
var_dump(bcpowmod(1, "A", 128, -200));
|
|
var_dump(bcpowmod(1, 1.2, 1, 1));
|
|
?>
|
|
--EXPECTF--
|
|
string(1) "1"
|
|
bc math warning: non-zero scale in exponent
|
|
string(3) "0.0"
|