diff --git a/src/Peachpie.Library/Streams/Streams.cs b/src/Peachpie.Library/Streams/Streams.cs index 94c7bdcfe..e84d3e2ee 100644 --- a/src/Peachpie.Library/Streams/Streams.cs +++ b/src/Peachpie.Library/Streams/Streams.cs @@ -41,7 +41,8 @@ namespace Pchp.Library.Streams /// Create a new stream context. /// The 2-dimensional array in format "options[wrapper][option]". - public static PhpResource stream_context_create(PhpArray options = null) + /// Must be an associative array in the format $arr['parameter'] = $value, or null. Refers to context parameters. + public static PhpResource stream_context_create(PhpArray options = null, PhpArray @params = null) { if (options == null) { @@ -51,7 +52,10 @@ namespace Pchp.Library.Streams // OK, data lead to a valid stream-context. if (CheckContextData(options)) { - return new StreamContext(options); + return new StreamContext(options) + { + Parameters = @params, + }; } // Otherwise..