Stream Wrapper¶
A wrapper is additional code which tells the stream how to handle specific protocols/encodings.
PHP supports several wrappers natively, in particular file://
, http://
, ftp://
, php://
, zlib://
, data://
, glob://
, phar://
, ssh2://
, rar://
, ogg://
and expect://
.
Customs wrappers may be registered with stream_wrapper_register(). A wrapper may write in any kind of format.
See also A Guide to Streams in PHP: In-Depth Tutorial With Examples, Supported Protocols and Wrappers, stream_wrapper_register, Example class registered as stream wrapper