PHP 8.3.4 Released!

stream_context_get_options

(PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8)

stream_context_get_optionsRetrieve options for a stream/wrapper/context

Beschreibung

stream_context_get_options(resource $stream_or_context): array

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

Parameter-Liste

stream_or_context

The stream or context to get options from

Rückgabewerte

Returns an associative array with the options.

Beispiele

Beispiel #1 stream_context_get_options() example

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

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

var_dump(stream_context_get_options(stream_context_get_default()));

?>

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

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

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top