xref: /php-src/ext/bcmath/tests/bcpowmod.phpt (revision 56f90492)
1--TEST--
2bcpowmod() - Raise an arbitrary precision number to another, reduced by a specified modulus
3--EXTENSIONS--
4bcmath
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