PHP.nl

stream_context_get_options

stream_context_get_options

Retrieve options for a stream/wrapper/context

array **stream_context_get_options** resource $stream_or_context

Returns an array of options on the specified stream or context.

stream_or_context The or to get options from stream``context

Returns an associative array with the options.

Voorbeeld: example

<?php
$params = array("method" => "POST");

stream_context_set_default(array("http" => $params));

var_dump(stream_context_get_options(stream_context_get_default()));

?>
array(1) {
  ["http"]=>
  array(1) {
    ["method"]=>
    string(4) "POST"
  }
}