xref: /PHP-8.0/ext/bcmath/tests/bcpowmod.phpt (revision cd05b56a)
1--TEST--
2bcpowmod() - Raise an arbitrary precision number to another, reduced by a specified modulus
3--SKIPIF--
4<?php if(!extension_loaded("bcmath")) print "skip"; ?>
5--INI--
6bcmath.scale=0
7--FILE--
8<?php
9var_dump(bcpowmod("5", "2", "7"));
10var_dump(bcpowmod("-2", "5", "7"));
11var_dump(bcpowmod("10", "2147483648", "2047"));
12var_dump(bcpowmod("10", "0", "2047"));
13?>
14--EXPECT--
15string(1) "4"
16string(2) "-4"
17string(3) "790"
18string(1) "1"
19