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     }



    assert(isset($getopt['status-file']) && is_string($getopt['status-file']));

    $statusFile = fopen($getopt['status-file'], 'wb');

    assert(is_resource($statusFile));



    assert(isset($getopt['progress-file']) && is_string($getopt['progress-file']));
<?php             return;

        }



        $teamcityLogFileHandle = fopen($this->options->configuration->logfileTeamcity(), 'ab+');

        assert($teamcityLogFileHandle !== false);

        $this->teamcityLogFileHandle = $teamcityLogFileHandle;

    }
<?php     {

        $path = $file->getPathname();

        assert($path !== '');

        $handle = fopen($path, 'r');

        assert($handle !== false);

        $fseek = fseek($handle, $this->tailPositions[$path] ?? 0);

        assert($fseek === 0);