1--TEST--
2Test posix_fpathconf
3--EXTENSIONS--
4posix
5--SKIPIF--
6<?php
7if (!function_exists("posix_pathconf")) die("skip only platforms with posix_pathconf");
8?>
9--FILE--
10<?php
11var_dump(posix_fpathconf(-1, POSIX_PC_PATH_MAX));
12var_dump(posix_errno() != 0);
13try {
14	posix_fpathconf("string arg", POSIX_PC_PATH_MAX);
15} catch (\TypeError $e) {
16	echo $e->getMessage() . "\n";
17}
18$fd = fopen(__DIR__, "r");
19var_dump(posix_fpathconf($fd, POSIX_PC_PATH_MAX));
20fclose($fd);
21?>
22--EXPECTF--
23bool(false)
24bool(true)
25posix_fpathconf(): Argument #1 ($file_descriptor) must be of type int|resource, string given
26int(%d)
27