(PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8)
stream_context_get_options — 擷取串流/包裝器/上下文選項
stream_or_context要從中取得選項的 串流 或 上下文
傳回包含選項的關聯式陣列。
範例 #1 stream_context_get_options() 範例
<?php
$params = array("method" => "POST");
stream_context_set_default(array("http" => $params));
var_dump(stream_context_get_options(stream_context_get_default()));
?>以上範例的輸出結果類似如下:
array(1) {
["http"]=>
array(1) {
["method"]=>
string(4) "POST"
}
}