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

stream_context_get_default

Description

The stream_context_get_default of Stream for PHP retrieve the default stream context.

Syntax

stream_context_get_default(
    ?array $options = null
): 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

1 · void

<?

$return = stream_context_get_default();

echo $return;
Resource id #2

2 · options

<?

$options =
[
    "http" =>
    [
        "method" => "POST"
    ]
];

$return = stream_context_get_default($options);

echo $return;
Resource id #2