xref: /PHP-7.0/ext/bcmath/tests/bug72093.phpt (revision a21a9974)
1--TEST--
2Bug 72093: bcpowmod accepts negative scale and corrupts _one_ definition
3--SKIPIF--
4<?php
5if(!extension_loaded("bcmath")) print "skip";
6if (substr(PHP_OS, 0, 3) == 'WIN') {
7    die('skip Not valid for windows');
8}
9?>
10--FILE--
11<?php
12var_dump(bcpowmod(1, "A", 128, -200));
13var_dump(bcpowmod(1, 1.2, 1, 1));
14?>
15--EXPECTF--
16string(1) "1"
17bc math warning: non-zero scale in exponent
18string(3) "0.0"
19