summaryrefslogtreecommitdiff
path: root/ext/bcmath/tests/bcpowmod.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bcmath/tests/bcpowmod.phpt')
-rw-r--r--ext/bcmath/tests/bcpowmod.phpt16
1 files changed, 16 insertions, 0 deletions
diff --git a/ext/bcmath/tests/bcpowmod.phpt b/ext/bcmath/tests/bcpowmod.phpt
new file mode 100644
index 0000000000..6b1f30e577
--- /dev/null
+++ b/ext/bcmath/tests/bcpowmod.phpt
@@ -0,0 +1,16 @@
+--TEST--
+bcpowmod() - Raise an arbitrary precision number to another, reduced by a specified modulus
+--SKIPIF--
+<?php if(!extension_loaded("bcmath")) print "skip"; ?>
+--INI--
+bcmath.scale=0
+--FILE--
+<?php
+echo bcpowmod("5", "2", "7") . "\n";
+echo bcpowmod("-2", "5", "7") . "\n";
+echo bcpowmod("10", "2147483648", "2047");
+?>
+--EXPECT--
+4
+-4
+790 \ No newline at end of file