stream_context_get_default

Retrieve the default stream context

Syntax

stream_context_get_default ([ array $options ] ) : resource

Parameters

options

options must be an associative array of associative arrays in the format $arr['wrapper']['option'] = $value.

Return

A stream context resource.

Examples

void

<?

$return = stream_context_get_default();

echo $return;

?>
Resource id #2

options

<?

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

$return = stream_context_get_default($options);

echo $return;

?>
Resource id #2

PHP

Home Menu