php-8.0.30-src/ext/gmp/tests/bug66872.phpt

17 lines
326 B
PHP

--TEST--
Bug #66872: Crash when passing string to gmp_testbit
--SKIPIF--
<?php if (!extension_loaded("gmp")) print "skip"; ?>
--FILE--
<?php
try {
var_dump(gmp_testbit("abc", 1));
} catch (\ValueError $e) {
echo $e->getMessage() . \PHP_EOL;
}
?>
--EXPECT--
gmp_testbit(): Argument #1 ($num) is not an integer string