1--TEST--
2stream context tcp_nodelay fopen
3--SKIPIF--
4<?php
5if (getenv("SKIP_ONLINE_TESTS")) die("skip online test");
6if (!extension_loaded("sockets")) die("skip: need sockets");
7?>
8--FILE--
9<?php
10$ctxt = stream_context_create([
11	"socket" => [
12		"tcp_nodelay" => true
13	]
14]);
15
16$stream = fopen("http://www.php.net", "r", false,  $ctxt);
17
18$socket =
19	@socket_import_stream($stream);
20
21var_dump(socket_get_option($socket, STREAM_IPPROTO_TCP, TCP_NODELAY) > 0);
22?>
23--EXPECT--
24bool(true)
25