array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'pt_BR', ), 'this' => array ( 0 => 'function.stream-context-get-options.php', 1 => 'stream_context_get_options', ), 'up' => array ( 0 => 'ref.stream.php', 1 => 'Funções de Fluxo', ), 'prev' => array ( 0 => 'function.stream-context-get-default.php', 1 => 'stream_context_get_default', ), 'next' => array ( 0 => 'function.stream-context-get-params.php', 1 => 'stream_context_get_params', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'pt_BR', 'path' => 'reference/stream/functions/stream-context-get-options.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8)
stream_context_get_options — Obtém opções para um fluxo/empacotador/contexto
Retorna um array de opções sobre o contexto ou fluxo especificado.
stream_or_context
O fluxo (stream) ou contexto (context) do qual as opções serão obtidas
Retorna um array associativo com as opções.
Exemplo #1 Exemplo de stream_context_get_options()
<?php
$params = array("method" => "POST");
stream_context_set_default(array("http" => $params));
var_dump(stream_context_get_options(stream_context_get_default()));
?>
O exemplo acima produzirá algo semelhante a:
array(1) { ["http"]=> array(1) { ["method"]=> string(4) "POST" } }