Before Streams, many functions in PHP were using a nightmare mess to handle sockets and regular files. It worked, but it sucked.

Then we wanted to support SSL - something needed to change.

Goals of the Streams API: