xref: /php-src/ext/gmp/tests/gh16501.phpt (revision 9ca68e03)
1--TEST--
2GH-16501 (gmp_random_bits overflow)
3--EXTENSIONS--
4gmp
5--FILE--
6<?php
7try {
8	gmp_random_bits(PHP_INT_MAX);
9} catch (\ValueError $e) {
10	echo $e->getMessage();
11}
12?>
13--EXPECTF--
14gmp_random_bits(): Argument #1 ($bits) must be between 1 and %d
15