stream_context_create

Supported Versions: PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8
Creates a stream context
<?php stream_context_create(?array $options = null, ?array $params = null): resource
<?php           ]

        ];

        

        $context  = stream_context_create($options);

        



        if ($data = @file_get_contents($url, false, $context)) {
<?php             || false !== strpos($e->getMessage(), 'Could not resolve host')

        ) {

            Silencer::suppress();

            $testConnectivity = file_get_contents('https://8.8.8.8', false, stream_context_create(array(

                'ssl' => array('verify_peer' => false),

                'http' => array('follow_location' => false, 'ignore_errors' => true),

            )));

            Silencer::restore();

            if (false !== $testConnectivity) {

                return array(
<?php             $options['http']['header'] = self::fixHttpHeaderField($options['http']['header']);

        }



        return stream_context_create($options, $defaultParams);

    }
<?php             }




            if (false === $target = @fopen($targetFile, 'w', null, stream_context_create(['ftp' => ['overwrite' => true]]))) {

                throw new IOException(sprintf('Failed to copy "%s" to "%s" because target file could not be opened for writing.', $originFile, $targetFile), 0, null, $originFile);

            }
<?php             $errstr,

            0,

            \STREAM_CLIENT_CONNECT | \STREAM_CLIENT_ASYNC_CONNECT,

            \stream_context_create($context)

        );



        if (false === $stream) {
<?php             $errno,

            $errstr,

            \STREAM_SERVER_BIND | \STREAM_SERVER_LISTEN,

            \stream_context_create(array('socket' => $context + array('backlog' => 511)))

        );

        if (false === $this->master) {

            if ($errno === 0) {
<?php             $errno,

            $errstr,

            \STREAM_SERVER_BIND | \STREAM_SERVER_LISTEN,

            \stream_context_create(array('socket' => $context))

        );

        if (false === $this->master) {