PHP 8.5.0 Alpha 1 available for testing

stream_context_get_params

(PHP 5 >= 5.3.0, PHP 7, PHP 8)

stream_context_get_paramsLee los parámetros de un contexto

Descripción

stream_context_get_params(resource $context): array

stream_context_get_params() lee los parámetros del contexto o del flujo stream_or_context.

Parámetros

context

Un recurso de flujo o de contexto.

Valores devueltos

Devuelve un array asociativo que contiene las opciones de contexto y su valor.

Ejemplos

Ejemplo #1 Ejemplo con stream_context_get_params()

Ejemplo simple.

<?php
$ctx
= stream_context_create();
$params = array("notification" => "stream_notification_callback");
stream_context_set_params($ctx, $params);

var_dump(stream_context_get_params($ctx));
?>

El resultado del ejemplo sería algo similar a:

array(2) {
  ["notification"]=>
  string(28) "stream_notification_callback"
  ["options"]=>
  array(0) {
  }
}

Ver también

add a note

User Contributed Notes

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