stream_context_get_params

Retrieves parameters from a context

Syntax

stream_context_get_params ( resource $stream_or_context ) : array

Parameters

stream_or_context

A stream resource or a context resource

Return

Returns an associate array containing all context options and parameters.

Examples

<?

$stream_or_context = stream_context_create();
$params = array("notification" => "stream_notification_callback");

stream_context_set_params($stream_or_context, $params);

$return = stream_context_get_params($stream_or_context);

print_r($return);

?>
Array
(
    [notification] => stream_notification_callback
    [options] => Array
        (
        )

)

PHP

Home Menu