1--TEST--
2posix_ttyname(): errors for invalid file descriptors
3--EXTENSIONS--
4posix
5--SKIPIF--
6<?php
7if (PHP_INT_SIZE != 8) die('skip C int is same size as zend_long');
8?>
9--FILE--
10<?php
11
12$values = [
13    -1,
14    2**50+1,
15];
16
17foreach ($values as $value) {
18    var_dump(posix_ttyname($value));
19}
20?>
21--EXPECTF--
22Warning: posix_ttyname(): Argument #1 ($file_descriptor) must be between 0 and %d in %s on line %d
23bool(false)
24
25Warning: posix_ttyname(): Argument #1 ($file_descriptor) must be between 0 and %d in %s on line %d
26bool(false)
27