1--TEST--
2GMP comparison operator overloading supports null
3--EXTENSIONS--
4gmp
5--FILE--
6<?php
7
8$num = gmp_init(42);
9
10try {
11    var_dump($num < null);
12} catch (Throwable $e) {
13    echo $e::class, ': ', $e->getMessage(), PHP_EOL;
14}
15
16try {
17    var_dump($num > null);
18} catch (Throwable $e) {
19    echo $e::class, ': ', $e->getMessage(), PHP_EOL;
20}
21
22try {
23    var_dump($num <= null);
24} catch (Throwable $e) {
25    echo $e::class, ': ', $e->getMessage(), PHP_EOL;
26}
27
28try {
29    var_dump($num >= null);
30} catch (Throwable $e) {
31    echo $e::class, ': ', $e->getMessage(), PHP_EOL;
32}
33
34try {
35    var_dump($num == null);
36} catch (Throwable $e) {
37    echo $e::class, ': ', $e->getMessage(), PHP_EOL;
38}
39
40try {
41    var_dump($num <=> null);
42} catch (Throwable $e) {
43    echo $e::class, ': ', $e->getMessage(), PHP_EOL;
44}
45
46?>
47--EXPECT--
48bool(false)
49bool(true)
50bool(false)
51bool(true)
52bool(false)
53int(1)
54