stream_context_get_options

Supported Versions: PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8
Retrieve options for a stream/wrapper/context
<?php stream_context_get_options(resource $stream_or_context): array
<?php         $method = $this->method;

        $context = \stream_context_get_options($socket);

        if (isset($context['ssl']['crypto_method'])) {

            $method = $context['ssl']['crypto_method'];

        }
<?php         $ref->setAccessible(true);

        $socket = $ref->getValue($server);



        $context = stream_context_get_options($socket);



        $this->assertEquals(array('socket' => array('backlog' => 4)), $context);
<?php         $ref->setAccessible(true);

        $socket = $ref->getValue($server);



        $context = stream_context_get_options($socket);



        $this->assertEquals(array('socket' => array('backlog' => 511)), $context);
<?php         $peer = new Promise(function ($resolve, $reject) use ($server) {

            $server->on('connection', function (ConnectionInterface $connection) use ($resolve) {

                $resolve(stream_context_get_options($connection->stream));

            });

        });
<?php         $peer = new Promise(function ($resolve, $reject) use ($server) {

            $server->on('connection', function (ConnectionInterface $connection) use ($resolve) {

                $resolve(stream_context_get_options($connection->stream));

            });

        });
<?php         $peer = new Promise(function ($resolve, $reject) use ($socket) {

            $socket->on('connection', function (ConnectionInterface $connection) use ($resolve) {

                $resolve(stream_context_get_options($connection->stream));

            });

        });