Stream Functions
PHP Manual

stream_get_meta_data

(PHP 4 >= 4.3.0, PHP 5)

stream_get_meta_dataRetrieves header/meta data from streams/file pointers

Description

array stream_get_meta_data ( resource $stream )

Returns information about an existing stream .

Parameters

stream

The stream can be any stream created by fopen(), fsockopen() and pfsockopen().

Return Values

The result array contains the following items:

Changelog

Version Description
5.0.0 The following entries were added in the returned array: mode, seekable, and uri.
4.3.0 The following entries were added in the returned array: stream_type, wrapper_type, wrapper_data, and filters.
4.3.0 socket_get_status() is an alias for this function. Prior to PHP 4.3.0, it was used to retrieve the first four items, for socket based streams only.

Notes

Note: This function does NOT work on sockets created by the Socket extension.


Stream Functions
PHP Manual