Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Creates a temporary file
tmpfile(): resource|false
            return $this->createWithContent($name$kilobytes);

        }



        return 
tap(new File($nametmpfile()), function ($file) use ($kilobytes$mimeType) {

            
$file->sizeToReport $kilobytes 1024;

            
$file->mimeTypeToReport $mimeType;

        });
    public function createWithContent($name$content)

    {

        
$tmpfile tmpfile();



        
fwrite($tmpfile$content);
    protected function generateImage($width$height$extension)

    {

        return 
tap(tmpfile(), function ($temp) use ($width$height$extension) {

            
ob_start();



            
$extension in_array($extension, ['jpeg''png''gif''webp''wbmp''bmp'])
    public function jsonErrorDataProvider()

    {


        
$resource tmpfile();




        
$recursiveObject = new stdClass;