1--TEST--
2Test error operation of random_int()
3--FILE--
4<?php
5//-=-=-=-
6
7try {
8    $randomInt = random_int();
9} catch (TypeError $e) {
10    echo $e->getMessage().PHP_EOL;
11}
12
13try {
14    $randomInt = random_int(42);
15} catch (TypeError $e) {
16    echo $e->getMessage().PHP_EOL;
17}
18
19try {
20    $randomInt = random_int(42,0);
21} catch (Error $e) {
22    echo $e->getMessage().PHP_EOL;
23}
24
25?>
26--EXPECT--
27random_int() expects exactly 2 arguments, 0 given
28random_int() expects exactly 2 arguments, 1 given
29random_int(): Argument #1 ($min) must be less than or equal to argument #2 ($max)
30