1--TEST--
2stream context tcp_nodelay
3--EXTENSIONS--
4sockets
5--SKIPIF--
6<?php
7if (getenv("SKIP_ONLINE_TESTS")) die("skip online test");
8?>
9--FILE--
10<?php
11$ctxt = stream_context_create([
12    "socket" => [
13        "tcp_nodelay" => true
14    ]
15]);
16
17$stream = stream_socket_client(
18    "tcp://www.php.net:80", $errno, $errstr, 10, STREAM_CLIENT_CONNECT, $ctxt);
19
20$socket =
21    socket_import_stream($stream);
22
23var_dump(socket_get_option($socket, SOL_TCP, TCP_NODELAY) > 0);
24?>
25--EXPECT--
26bool(true)
27