1--TEST--
2posix_ttyname(): uncastable user stream
3--EXTENSIONS--
4posix
5--FILE--
6<?php
7
8require dirname(__DIR__, 3) . '/tests/output/DummyStreamWrapper.inc';
9stream_wrapper_register('custom', DummyStreamWrapper::class);
10
11$fp = fopen("custom://myvar", "r+");
12var_dump(posix_ttyname($fp));
13fclose($fp);
14
15echo "Done";
16?>
17--EXPECTF--
18Warning: posix_ttyname(): Could not use stream of type 'user-space' in %s on line %d
19bool(false)
20Done
21