stream_get_meta_data

Supported Versions: PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8
Retrieves header/meta data from streams/file pointers
<?php stream_get_meta_data(resource $stream): array
<?php             );

        }



        $meta = \stream_get_meta_data($this->master);

        if (!isset($meta['stream_type']) || $meta['stream_type'] !== 'tcp_socket') {

            \fclose($this->master);
<?php         $this->assertInstanceOf('React\Socket\Connection', $client);

        $this->assertTrue(isset($client->stream));



        $meta = stream_get_meta_data($client->stream);

        $this->assertTrue(isset($meta['crypto']['protocol']));



        if ($meta['crypto']['protocol'] === 'UNKNOWN') {
<?php         $this->assertInstanceOf('React\Socket\Connection', $client);

        $this->assertTrue(isset($client->stream));



        $meta = stream_get_meta_data($client->stream);

        $this->assertTrue(isset($meta['crypto']['protocol']));

        $this->assertEquals('TLSv1.2', $meta['crypto']['protocol']);
<?php         $this->assertInstanceOf('React\Socket\Connection', $client);

        $this->assertTrue(isset($client->stream));



        $meta = stream_get_meta_data($client->stream);

        $this->assertTrue(isset($meta['crypto']['protocol']));

        $this->assertEquals('TLSv1.2', $meta['crypto']['protocol']);
<?php         $this->assertInstanceOf('React\Socket\Connection', $client);

        $this->assertTrue(isset($client->stream));



        $meta = stream_get_meta_data($client->stream);

        $this->assertTrue(isset($meta['crypto']['protocol']));

        $this->assertEquals('TLSv1', $meta['crypto']['protocol']);