dis-bench / src /php /php-src /ext /gmp /tests /comparison_invalid.phpt
meddyrat's picture
Replace repository contents with the original corrected artifact
1e94262
Raw History Blame Contribute Delete
461 Bytes
--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