1--TEST--
2stream_isatty(): casting stream does not emit data loss and should not emit warnings
3Bug GH-10092 (Internal stream casting should not emit lost bytes warning twice)
4--SKIPIF--
5<?php
6require __DIR__ . '/../../ext/standard/tests/http/server.inc'; http_server_skipif();
7?>
8--INI--
9allow_url_fopen=1
10--FILE--
11<?php
12
13require __DIR__ . '/../../ext/standard/tests/http/server.inc';
14
15$responses = array(
16    "data://text/plain,HTTP/1.0 200 Ok\r\nSome: Header\r\nSome: Header\r\n\r\nBody",
17);
18
19['pid' => $pid, 'uri' => $uri] = http_server($responses, $output);
20
21/* Note: the warning is bogus in this case as no data actually gets lost,
22 * but this checks that stream casting works */
23$handle = fopen($uri, 'r');
24var_dump(stream_isatty($handle));
25var_dump(fread($handle, 20));
26fclose($handle);
27
28http_server_kill($pid);
29?>
30--EXPECT--
31bool(false)
32string(4) "Body"
33