# Caveat Emptor: some streams don't know if they are seekable until
# sometime tries to seek first (user streams).
add_assoc_long(return_value, "unread_bytes", stream->writepos - stream->readpos);
+ add_assoc_bool(return_value, "seekable", (stream->ops->seek) && (stream->flags & PHP_STREAM_FLAG_NO_SEEK) == 0);
+
if (!php_stream_populate_meta_data(stream, return_value)) {
add_assoc_bool(return_value, "timed_out", 0);
add_assoc_bool(return_value, "blocked", 1);