xref: /PHP-7.2/ext/bcmath/tests/bug75178.phpt (revision 589f8107)
1--TEST--
2Bug #75178 (bcpowmod() misbehaves for non-integer base or modulus)
3--SKIPIF--
4<?php
5if (!extension_loaded('bcmath')) die('skip bcmath extension is not available');
6if (substr(PHP_OS, 0, 3) == 'WIN') {
7	$cur = PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD;
8	$req = "10.0.17134";
9	if (version_compare($cur, $req) < 0) {
10		echo "skip Compatible on Windows systems >= $req";
11	}
12}
13?>
14--FILE--
15<?php
16var_dump(bcpowmod('4.1', '4', '3', 3));
17var_dump(bcpowmod('4', '4', '3.1', 3));
18?>
19===DONE===
20--EXPECT--
21bc math warning: non-zero scale in base
22string(5) "1.000"
23bc math warning: non-zero scale in modulus
24string(5) "1.000"
25===DONE===
26