Input/output streams
Quite early in development, every programmer stumbles upon the streams term. This seemingly frightening term represents a form of data. Unlike the typical finite type of data, streams represent a potentially unlimited sequence of data. In PHP terms, a stream is a resource object exhibiting streamable behavior. Using various wrappers, the PHP language supports a wide range of streams. The stream_get_wrappers() function can retrieve a list of all the registered stream wrappers available on the currently running system, such as the following:
phpfileglobdatahttpftpzipcompress.zlibcompress.bzip2httpsftpsphar
The list of wrappers is quite extensive, but not finite. We can also register our own wrappers using the stream_wrapper_register() function. Each wrapper tells the stream how to handle specific protocols and encodings. Each stream is therefore accessed through the scheme://target syntax, such as the following:
php://stdinfile:///path/to/file.extglob://var/www/html/*.php...