1--TEST--
2Invalid comparison with a GMP object
3--EXTENSIONS--
4gmp
5--FILE--
6<?php
7
8try {
9    var_dump("hapfegfbu" > gmp_init(0));
10} catch (\Error $e) {
11    echo $e::class, ': ', $e->getMessage(), \PHP_EOL;
12}
13
14try {
15    var_dump((new DateTime()) > gmp_init(0));
16} catch (\Error $e) {
17    echo $e::class, ': ', $e->getMessage(), \PHP_EOL;
18}
19
20?>
21--EXPECT--
22ValueError: Number is not an integer string
23TypeError: Number must be of type GMP|string|int, DateTime given
24