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	"http" => [
15		"follow_location" => 0
16	]
17]);
18
19$stream = fopen("http://www.php.net", "r", false,  $ctxt);
20
21$socket =
22	@socket_import_stream($stream);
23
24var_dump(socket_get_option($socket, STREAM_IPPROTO_TCP, TCP_NODELAY) > 0);
25?>
26--EXPECT--
27bool(true)
28