xref: /PHP-7.3/ext/bcmath/tests/bug72093.phpt (revision 589f8107)
1--TEST--
2Bug 72093: bcpowmod accepts negative scale and corrupts _one_ definition
3--SKIPIF--
4<?php
5if(!extension_loaded("bcmath")) print "skip";
6?>
7--FILE--
8<?php
9var_dump(bcpowmod(1, "A", 128, -200));
10var_dump(bcpowmod(1, 1.2, 1, 1));
11?>
12--EXPECTF--
13string(1) "1"
14
15Warning: bcpowmod(): non-zero scale in exponent in %s on line %d
16string(3) "0.0"
17