Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100801 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 65211 invoked from network); 30 Sep 2017 09:30:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Sep 2017 09:30:30 -0000 Received: from [127.0.0.1] ([127.0.0.1:24821]) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ECSTREAM id 17/94-34435-6346FC95 for ; Sat, 30 Sep 2017 05:30:30 -0400 Authentication-Results: pb1.pair.com smtp.mail=nyamsprod@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nyamsprod@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.42 as permitted sender) X-PHP-List-Original-Sender: nyamsprod@gmail.com X-Host-Fingerprint: 209.85.214.42 mail-it0-f42.google.com Received: from [209.85.214.42] ([209.85.214.42:53804] helo=mail-it0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1F/71-34435-0DD2EC95 for ; Fri, 29 Sep 2017 07:26:08 -0400 Received: by mail-it0-f42.google.com with SMTP id 85so1699248ith.2 for ; Fri, 29 Sep 2017 04:26:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=lxgvPlYKx6F11NAGJ3KMIC85OGZOD/5S0nXFSGaVxXE=; b=cVe1i0c111I8zQC3vDKaCr1DsOH59N/ILa+id+ZrESM1/9tN89JQlnZ/EhF9kmVGYZ /XdYC0IuKKTjth+9Es2WuZq7ho8Fxbmp4+M/ZjCDGWM+psPwEzoiJLy1BRcGmBbKWMoq +WoSCE5IpgJjnlD/lB/AR0BRd7zW09lmIaxzDhxwtshOl/ExBynuZddZDBOhYccrA94d BsqmaMLGcjN7b46uo929HEK9e8vZaVkhqVEFpKobfXbSNFzIyfJH2sEVd0f6Rqy7AJei GzC3D5tYYotEEmOFyz/riakBJpIvl5mspIxQaPxLvEt1qVoj4+NwvduMAYWMmLeNITzV sHfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=lxgvPlYKx6F11NAGJ3KMIC85OGZOD/5S0nXFSGaVxXE=; b=UT9HFeR76SB1G9u/YKsSMrD1Luyw7ezAkJd+8SQT3tfv/XzQhGtOiGzhKzylivy3tU G1l8Cjx1Gr0HUHFDb0uE3GGWeBSU9hyTPB68LQrE0bDxqOL3C61+qSLG+l+mSw6zAgqb x+fFlNWIvBZnJGMbfD8kjPw0Lp0uoMrrO61cdls+yRWFAlMFYagZ2EvGeNNeFLmhqRg3 wXvJ2Yc1FFSHS8ioRg4mLV1BUtOHU0Xk4i0OQDzjrJQpi2Roh/XTQGRaIWQOdWFhcmvB 55K8c3Azc1Yzv3ISPSQtq1cFhgkpfG9q/APb0mCRdGmrH1AmfSXClLdwvDc8A6xI+0e4 O9+Q== X-Gm-Message-State: AHPjjUjlBn20IY7G9ImBXmQaFt87XDchtKqY/ag/Nkjgm/ft0SgvLoAk sN05pF1P3T7XvSK1JIFy8jYbd7tp6i8vJSya2uI= X-Google-Smtp-Source: AOwi7QCsSljA9i0+8JunDYUtttkg3189yGWl6bQfHSWj4VLMEqA59WYBY03rqOOhUUd/v4bEDC5QgqwSpdKNVvUFrsc= X-Received: by 10.36.196.2 with SMTP id v2mr5990884itf.88.1506684365571; Fri, 29 Sep 2017 04:26:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.85.198 with HTTP; Fri, 29 Sep 2017 04:26:04 -0700 (PDT) Received: by 10.79.85.198 with HTTP; Fri, 29 Sep 2017 04:26:04 -0700 (PDT) Date: Fri, 29 Sep 2017 13:26:04 +0200 Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary="94eb2c05fe3e660996055a524ac8" Subject: Making stream functions accept Splfileobject instances From: nyamsprod@gmail.com (nyamsprod the funky webmaster) --94eb2c05fe3e660996055a524ac8 Content-Type: text/plain; charset="UTF-8" Hi internals, I've been following the resolution of this bug: https://bugs.php.net/bug.php?id=44392 and it seems that there is no safe way to expose the internal `SplFileObject` filepointer. So I was wondering if we could not do things differently and instead of trying to expose the internal file pointer make any `stream_*` function which accept a resource stream as parameter accept a `SplFileObject`. By doing so we could resolve a couple of issues I encountered while using this SPL object without adding any new method to the class we could: - get informations about the object seekable and open mode status using `stream_get_meta_data`. - append/prepend stream filters without using the `php://filter/` hack which has its own limitations. What do you think ? --94eb2c05fe3e660996055a524ac8--