Built-in within PHP, streams are a way to generalize file, network, data compression, and other operations which share a common set of functions and uses. A stream can be read from and written to linearly, and may be able to fseek() to an arbitrary location.