xref: /PHP-7.0/ext/gmp/tests/bug69803.phpt (revision 1acf55eb)
1--TEST--
2Bug #69803: gmp_random_range() modifies second parameter if GMP number
3--FILE--
4<?php
5
6$a = gmp_init(100);
7$b = gmp_init(200);
8echo $a . ", ", $b . "\n";
9gmp_random_range($a, $b);
10echo $a . ", ", $b . "\n";
11
12$b = gmp_init(200);
13echo $a . ", ", $b . "\n";
14gmp_random_range(100, $b);
15echo $a . ", ", $b . "\n";
16
17?>
18--EXPECT--
19100, 200
20100, 200
21100, 200
22100, 200
23