Skip to content

Commit

Permalink
stream_context_set_options()
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubmisek committed Feb 20, 2025
1 parent 9f5564b commit 760d744
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Peachpie.Library/Streams/Streams.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,16 @@ public static bool stream_context_set_option(PhpResource stream_or_context, stri
/// <param name="stream_or_context">The PhpResource of either PhpStream or StreamContext type.</param>
/// <param name="options">The options to set for <paramref name="stream_or_context"/>.</param>
/// <returns>True on success.</returns>
public static bool stream_context_set_option(PhpResource stream_or_context, PhpArray options)
//[Obsolete("Deprecated as of PHP 8.4.0, use stream_context_set_options() instead.")]
public static bool stream_context_set_option(PhpResource stream_or_context, PhpArray options) => stream_context_set_options(stream_or_context, options);

/// <summary>
/// Sets an option for a stream/wrapper/context.
/// </summary>
/// <param name="stream_or_context">The PhpResource of either PhpStream or StreamContext type.</param>
/// <param name="options">The options to set for <paramref name="stream_or_context"/>.</param>
/// <returns>True on success.</returns>
public static bool stream_context_set_options(PhpResource stream_or_context, PhpArray options)
{
// OK, creates the context if Default, so that Data is always a PhpArray.
// Fails only if the first argument is not a stream nor context.
Expand Down

0 comments on commit 760d744

Please sign in to comment.