blob: 1f3a423267ee6ffd948ad4e1fb0fb8ee958dc338 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
--TEST--
Overloaded GMP comparison in sort() etc
--SKIPIF--
<?php if (!extension_loaded("gmp")) print "skip"; ?>
--FILE--
<?php
$arr = [gmp_init(0), -3, gmp_init(2), 1];
sort($arr);
var_dump($arr);
var_dump(min(gmp_init(3), 4));
var_dump(max(gmp_init(3), 4));
?>
--EXPECT--
array(4) {
[0]=>
int(-3)
[1]=>
object(GMP)#1 (1) {
["num"]=>
string(1) "0"
}
[2]=>
int(1)
[3]=>
object(GMP)#2 (1) {
["num"]=>
string(1) "2"
}
}
object(GMP)#3 (1) {
["num"]=>
string(1) "3"
}
int(4)
|