Streams stream_context_get_options

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

stream_context_get_options — 스트림/래퍼/컨텍스트에 대한 옵션 검색


설명

stream_context_get_options(resource $stream_or_context): array

지정된 스트림 또는 컨텍스트에 대한 옵션 배열을 반환합니다.


매개변수

stream_or_context
옵션을 가져올 스트림 또는 컨텍스트

반환 값

옵션이 있는 연관 배열을 반환합니다.


Examples

예제 #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"
  }
}