Skip to content

Commit 760d744

Browse files
committed
stream_context_set_options()
1 parent 9f5564b commit 760d744

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/Peachpie.Library/Streams/Streams.cs

+10-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,16 @@ public static bool stream_context_set_option(PhpResource stream_or_context, stri
180180
/// <param name="stream_or_context">The PhpResource of either PhpStream or StreamContext type.</param>
181181
/// <param name="options">The options to set for <paramref name="stream_or_context"/>.</param>
182182
/// <returns>True on success.</returns>
183-
public static bool stream_context_set_option(PhpResource stream_or_context, PhpArray options)
183+
//[Obsolete("Deprecated as of PHP 8.4.0, use stream_context_set_options() instead.")]
184+
public static bool stream_context_set_option(PhpResource stream_or_context, PhpArray options) => stream_context_set_options(stream_or_context, options);
185+
186+
/// <summary>
187+
/// Sets an option for a stream/wrapper/context.
188+
/// </summary>
189+
/// <param name="stream_or_context">The PhpResource of either PhpStream or StreamContext type.</param>
190+
/// <param name="options">The options to set for <paramref name="stream_or_context"/>.</param>
191+
/// <returns>True on success.</returns>
192+
public static bool stream_context_set_options(PhpResource stream_or_context, PhpArray options)
184193
{
185194
// OK, creates the context if Default, so that Data is always a PhpArray.
186195
// Fails only if the first argument is not a stream nor context.

0 commit comments

Comments
 (0)