Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121411 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 977 invoked from network); 18 Oct 2023 17:09:48 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 18 Oct 2023 17:09:48 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4992A180044 for ; Wed, 18 Oct 2023 10:09:47 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS24940 176.9.0.0/16 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 18 Oct 2023 10:09:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1697648985; bh=+0Qt8aRdL0m3Is3lfgO6gAeHfElmmFgn7+J5Eo/zRHQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=Hs1uB+OcPX9rJeJYG184Ne6dyLIpGvsvMKZW9QwntzS5dsNCXp2V/frMR6qKqeVsG /y4fCQOVOKl4j/sBpg/Ub5cmuFwWKh4y6secRQgEPGrN0zEMIpb+1tGjVtwnzKlfa5 5ma6OVYiUn223Dgilg2FwaYjErpMbr5M5bIM32VKuN2hSZTkqOmvq5M11d/oq18GIv jAKPblW4bQnrI/DB/kM2nt98WTghEqQtZgigjXeIk+/byLrlH+HOlWOwmNw3m3PpSX 2XPM1qguAjLfrTXA6vxJ6ROsQYJtUG25QDp6PBU7BhWPRGxXETx388X5IbV486bKZs dExOuh0l6UQXQ== Message-ID: Date: Wed, 18 Oct 2023 19:09:44 +0200 MIME-Version: 1.0 Content-Language: en-US To: Derick Rethans Cc: Ilija Tovilo , PHP internals References: <6fccfe47-21ac-fa5b-e52e-28064f26125b@bastelstu.be> <91b89c73-03f8-31df-cfab-84009b3d3bce@php.net> In-Reply-To: <91b89c73-03f8-31df-cfab-84009b3d3bce@php.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC][Under discussion] RFC1867 for non-POST HTTP verbs From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi On 10/18/23 18:07, Derick Rethans wrote: >> Regarding the cleanup of the files, perhaps the files could be read into a >> `php://temp` stream >> (https://www.php.net/manual/en/wrappers.php.php#wrappers.php.memory)? > > I don't think that reading potentially large files into memory is a > great idea. It is precisely because of the memory issue that PHP's > existing POST handler writes files to disk, instead of leaving their > content available through an entry in $_FILES. To clarify: `php://temp` spills over to disk at a certain size (2 MB by default). Best regards Tim Düsterhus