Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Opens file or URL
<?php fopen(    string $filename,    string $mode,    bool $use_include_path = false,    ?resource $context = null): resource|false
<?php         $this->loop = $loop ?: Loop::get();



        $this->master = @\fopen('php://fd/' . $fd, 'r+');

        if (false === $this->master) {
<?php             $this->markTestSkipped('HHVM does not support socket operation on test memory stream');

        }



        $resource = fopen('php://memory', 'r+');

        $loop = $this->getMockBuilder('React\EventLoop\LoopInterface')->getMock();



        $connection = new Connection($resource, $loop);
<?php             $this->markTestSkipped('HHVM does not support socket operation on test memory stream');

        }



        $resource = fopen('php://memory', 'r+');

        $loop = $this->getMockBuilder('React\EventLoop\LoopInterface')->getMock();

        $loop->expects($this->once())->method('addWriteStream')->with($resource);
<?php         $fds = array();

        for ($i = 0; $i < $ulimit; ++$i) {

            $fd = @fopen('/dev/null', 'r');

            if ($fd === false) {

                break;

            }