Douglas Mayle
Douglas Mayle

Reputation: 21755

What do PHP stream contexts do in relation to file operations?

In the PHP manual, the file operations reference an optional context (e.g. for copy). How do these contexts affect basic file operations?

Upvotes: 2

Views: 303

Answers (1)

Douglas Mayle
Douglas Mayle

Reputation: 21755

As it turns out, stream contexts can contain both options and parameters. At the current time, parameters are simply callback functions so that you can be notified at various points of the file operation. Options are wrapper-specific, and filesystem operations don't have any options. Some examples of options for the HTTP wrapper are method, proxy, etc.

Upvotes: 1

Related Questions