--TEST-- Testing stream_get_meta_data() "unread_bytes" field on a udp socket --FILE-- --EXPECTF-- Write some data: array(8) { ["timed_out"]=> bool(false) ["blocked"]=> bool(true) ["eof"]=> bool(false) ["stream_type"]=> string(%d) "tcp_socke%s" ["mode"]=> string(2) "r+" ["unread_bytes"]=> int(0) ["seekable"]=> bool(false) ["uri"]=> string(21) "tcp://127.0.0.1:31331" } Read a line from the client, causing data to be buffered: array(8) { ["timed_out"]=> bool(false) ["blocked"]=> bool(true) ["eof"]=> bool(false) ["stream_type"]=> string(%d) "tcp_socke%s" ["mode"]=> string(2) "r+" ["unread_bytes"]=> int(15) ["seekable"]=> bool(false) ["uri"]=> string(21) "tcp://127.0.0.1:31331" } Read 3 bytes of data from the client: array(8) { ["timed_out"]=> bool(false) ["blocked"]=> bool(true) ["eof"]=> bool(false) ["stream_type"]=> string(%d) "tcp_socke%s" ["mode"]=> string(2) "r+" ["unread_bytes"]=> int(12) ["seekable"]=> bool(false) ["uri"]=> string(21) "tcp://127.0.0.1:31331" } Close the server side socket and read the remaining data from the client: array(8) { ["timed_out"]=> bool(false) ["blocked"]=> bool(true) ["eof"]=> bool(true) ["stream_type"]=> string(%d) "tcp_socke%s" ["mode"]=> string(2) "r+" ["unread_bytes"]=> int(0) ["seekable"]=> bool(false) ["uri"]=> string(21) "tcp://127.0.0.1:31331" }