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     public function testIsStream()

    {

        $source = $this->getTestDecoder(fopen(__DIR__ . '/images/test.jpg', 'r'));

        $this->assertTrue($source->isStream());



        $source = $this->getTestDecoder(new \GuzzleHttp\Psr7\Stream(fopen(__DIR__ . '/images/test.jpg', 'r')));
<?php         $source = $this->getTestDecoder(fopen(__DIR__ . '/images/test.jpg', 'r'));

        $this->assertTrue($source->isStream());



        $source = $this->getTestDecoder(new \GuzzleHttp\Psr7\Stream(fopen(__DIR__ . '/images/test.jpg', 'r')));

        $this->assertTrue($source->isStream());



        $source = $this->getTestDecoder(null);