<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.stream.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'function.stream-context-set-option.php',
    1 => 'stream_context_set_option',
    2 => 'Sets an option for a stream/wrapper/context',
  ),
  'up' => 
  array (
    0 => 'ref.stream.php',
    1 => 'Stream-Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.stream-context-set-default.php',
    1 => 'stream_context_set_default',
  ),
  'next' => 
  array (
    0 => 'function.stream-context-set-options.php',
    1 => 'stream_context_set_options',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/stream/functions/stream-context-set-option.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.stream-context-set-option" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">stream_context_set_option</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.3.0, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">stream_context_set_option</span> &mdash; <span class="dc-title">Sets an option for a stream/wrapper/context</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.stream-context-set-option-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>stream_context_set_option</strong></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> <code class="parameter">$stream_or_context</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$wrapper</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$option_name</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span><br>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   The following alternative signature is deprecated as of PHP 8.4.0,
   use <span class="function"><a href="function.stream-context-set-options.php" class="function">stream_context_set_options()</a></span> instead.
   <div class="methodsynopsis dc-description">
    <span class="methodname"><strong>stream_context_set_option</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> <code class="parameter">$stream_or_context</code></span>, <span class="methodparam"><span class="type"><a href="language.types.array.php" class="type array">array</a></span> <code class="parameter">$options</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  </p>
  <p class="simpara">
    Sets an option on the specified context.  <code class="parameter">value</code>
    is set to <code class="parameter">option</code> for <code class="parameter">wrapper</code>
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.stream-context-set-option-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">stream_or_context</code></dt>
     <dd>
      <p class="para">
       The stream or context resource to apply the options to.
      </p>
     </dd>
    
    
     <dt><code class="parameter">wrapper</code></dt>
     <dd>
      <p class="para">
       The name of the wrapper (which may be different than the protocol).
       Refer to <a href="context.php" class="link">context options and parameters</a>
       for a listing of stream options.
     </p>
     </dd>
    
    
     <dt><code class="parameter">option_name</code></dt>
     <dd>
      <p class="para">
       The name of the option.
      </p>
     </dd>
    
    
     <dt><code class="parameter">value</code></dt>
     <dd>
      <p class="para">
       The value of the option.
      </p>
     </dd>
    
    
     <dt><code class="parameter">options</code></dt>
     <dd>
      <p class="para">
       The options to set for <code class="parameter">stream_or_context</code>.
      </p>
      <blockquote class="note"><p><strong class="note">Hinweis</strong>: 
       <p class="para">
        <code class="parameter">options</code> must be an associative
        array of associative arrays in the format
        <code class="literal">$arr[&#039;wrapper&#039;][&#039;option&#039;] = $value</code>.
       </p>
       <p class="para">
       Refer to <a href="context.php" class="link">context options and parameters</a>
       for a listing of stream options.
       </p>
      </p></blockquote>
     </dd>
    
   </dl>
  </p>
 </div>

 
 <div class="refsect1 returnvalues" id="refsect1-function.stream-context-set-option-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Gibt bei Erfolg <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> zurück. Bei einem Fehler wird <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> zurückgegeben.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.stream-context-set-option-changelog">
  <h3 class="title">Changelog</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Beschreibung</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.4.0</td>
      <td>
       The alternative 2-parameter signature is now deprecated.
       Use <span class="function"><a href="function.stream-context-set-options.php" class="function">stream_context_set_options()</a></span> instead.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


</div><?php manual_footer($setup); ?>