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