summaryrefslogtreecommitdiff
path: root/ext/gmp
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2015-02-20 10:01:00 +0100
committerOndřej Surý <ondrej@sury.org>2015-02-20 10:01:00 +0100
commit347aa01617585e89149414a9763175a19d2dc651 (patch)
tree98170e6aeca907f029fe7b5abbbd2e7f2f4a5412 /ext/gmp
parent832b62efb8fceebb220116d8024d945a9bd31d7e (diff)
downloadphp-347aa01617585e89149414a9763175a19d2dc651.tar.gz
New upstream version 5.6.6+dfsgupstream
Diffstat (limited to 'ext/gmp')
-rw-r--r--ext/gmp/gmp.c2
-rw-r--r--ext/gmp/php_gmp.h2
-rw-r--r--ext/gmp/tests/gmp_gcdext.phpt32
3 files changed, 13 insertions, 23 deletions
diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c
index de61f1ca5..ba59acb51 100644
--- a/ext/gmp/gmp.c
+++ b/ext/gmp/gmp.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2014 The PHP Group |
+ | Copyright (c) 1997-2015 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/gmp/php_gmp.h b/ext/gmp/php_gmp.h
index a1a1dc262..6e9ee20a0 100644
--- a/ext/gmp/php_gmp.h
+++ b/ext/gmp/php_gmp.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2014 The PHP Group |
+ | Copyright (c) 1997-2015 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/gmp/tests/gmp_gcdext.phpt b/ext/gmp/tests/gmp_gcdext.phpt
index 469aa3013..57fb05822 100644
--- a/ext/gmp/tests/gmp_gcdext.phpt
+++ b/ext/gmp/tests/gmp_gcdext.phpt
@@ -24,9 +24,9 @@ $a = array(
foreach ($a as $val) {
$r = gmp_gcdext($val[0],$val[1]);
+ $check = gmp_add(gmp_mul($val[0],$r['s']), gmp_mul($val[1],$r['t']));
var_dump(gmp_strval($r['g']));
- var_dump(gmp_strval($r['s']));
- var_dump(gmp_strval($r['t']));
+ var_dump(gmp_strval($check));
}
var_dump(gmp_gcdext($val[0],array()));
@@ -39,35 +39,25 @@ echo "Done\n";
?>
--EXPECTF--
string(1) "3"
-string(2) "-4"
-string(2) "11"
+string(1) "3"
+string(1) "1"
string(1) "1"
-string(4) "-805"
-string(3) "359"
string(1) "3"
-string(2) "32"
-string(5) "-2257"
+string(1) "3"
string(4) "3003"
-string(3) "-10"
-string(2) "19"
+string(4) "3003"
+string(1) "2"
string(1) "2"
-string(2) "67"
-string(2) "-3"
string(2) "15"
-string(7) "-601519"
-string(1) "6"
+string(2) "15"
+string(3) "345"
string(3) "345"
string(1) "1"
-string(1) "0"
string(1) "1"
-string(5) "84319"
-string(9) "-84241831"
string(1) "1"
-string(13) "-156252240050"
-string(14) "16689072773537"
+string(1) "1"
+string(3) "195"
string(3) "195"
-string(11) "46994884483"
-string(9) "-68772552"
Warning: gmp_gcdext(): Unable to convert variable to GMP - wrong type in %s on line %d
bool(false)