Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

stream_context_get_options

Description

The stream_context_get_options of Stream for PHP retrieve options for a stream/wrapper/context.

Syntax

stream_context_get_options ( resource $stream_or_context ) : array

Parameters

stream_or_context

The stream or context to get options from

Return

Returns an associative array with the options.

Examples

1

<?

$stream_or_context = stream_context_create();
$options = array("http" => array("method" => "POST"));

stream_context_set_option($stream_or_context, $options);

$return = stream_context_get_options($stream_or_context);

print_r($return);

?>
Array
(
    [http] => Array
        (
            [method] => POST
        )

)
HomeMenu