xref: /PHP-8.0/ext/gmp/tests/bug66872.phpt (revision 65f14b0d)
1--TEST--
2Bug #66872: Crash when passing string to gmp_testbit
3--SKIPIF--
4<?php if (!extension_loaded("gmp")) print "skip"; ?>
5--FILE--
6<?php
7
8try {
9    var_dump(gmp_testbit("abc", 1));
10} catch (\ValueError $e) {
11    echo $e->getMessage() . \PHP_EOL;
12}
13
14?>
15--EXPECT--
16gmp_testbit(): Argument #1 ($num) is not an integer string
17