File size: 461 Bytes
1e94262
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--TEST--
Invalid comparison with a GMP object
--EXTENSIONS--
gmp
--FILE--
<?php

try {
    var_dump("hapfegfbu" > gmp_init(0));
} catch (\Error $e) {
    echo $e::class, ': ', $e->getMessage(), \PHP_EOL;
}

try {
    var_dump((new DateTime()) > gmp_init(0));
} catch (\Error $e) {
    echo $e::class, ': ', $e->getMessage(), \PHP_EOL;
}

?>
--EXPECT--
ValueError: Number is not an integer string
TypeError: Number must be of type GMP|string|int, DateTime given