Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100800 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 65196 invoked from network); 30 Sep 2017 09:30:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Sep 2017 09:30:29 -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 F6/94-34435-5346FC95 for ; Sat, 30 Sep 2017 05:30:29 -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.223.169 as permitted sender) X-PHP-List-Original-Sender: nyamsprod@gmail.com X-Host-Fingerprint: 209.85.223.169 mail-io0-f169.google.com Received: from [209.85.223.169] ([209.85.223.169:44055] helo=mail-io0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AA/AD-34114-9E3FCC95 for ; Thu, 28 Sep 2017 09:06:50 -0400 Received: by mail-io0-f169.google.com with SMTP id v36so1490349ioi.1 for ; Thu, 28 Sep 2017 06:06:49 -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=55t0D5N1wQvprLWjs9bM1haRKImkrd9fFQe7biglZo8=; b=LJqp3nt4XdNjLM2OTrxYlCM5jev62Mg/j+BQOtzAJEw2pmGyd/qc4ros7EJUTyjY/Q pMx+TWfPpg/8zxay/BAF3Of2z3LN8JjGtWdyu0ELoSLmWdfpKoqIOfUcOegXfLN9jVu8 d1twF3n8ShnAwQgqeB0DpydrqEpH7Xi+epVcG6fYIgc0OIl4Kxkd+8lRUdjDtF2GhPVk Vhjl7WOYbgcN2zutF3jcQbOY7cxSrVCEJRkF/qbBdkT35FyXKRJVkSf7hez1KR1BBlKo qRu61QXh4Zlaaj9t3296rsCU3pZfB+4g2X7AYjwQu0dwUPdxhvkKCp3x8k83dCyvvFiq lqtQ== 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=55t0D5N1wQvprLWjs9bM1haRKImkrd9fFQe7biglZo8=; b=OMaI+FqH5kVc0gVTllGI+IMss3AFyXpAYpZdbfbMWb9lUxQTLz5HtdT1UlE8eqrVkH fop/CLg9jUNKyq6diuQP87lNWKhvfOnIZtS6KwoRTsqQLj2LTYD9DGC1s/Z5dsXwETYu lXWHYoVqt/IsevGqs2aC+EArKdv/K18NuacAgTf/3h4heEkxZ+EiDZXCbDnxMMVjBl6u XZ5Hw89s9n8hgpPdzF7kOxWpGBDWpW2mEevTuahssyXAojEtoKPPPzAU4D5Y8hEST232 q4XpmxY3biF6Cbl/Gn76ukd0Xl3HwT5/Wsh0x0QYlToQwKzOx9gG8nEmA/kT4QkbkiCI Tq2A== X-Gm-Message-State: AHPjjUg9dJCfjAaCn5VUMk6EmHaGOhM4Myy/1XEz3MFLKRBv5KlIeE3T KLVaneQBvTlZxjKUyU13japXBdb3xBmhnqnpfRDDVA== X-Google-Smtp-Source: AOwi7QC/t/fvAgDLZRc+eOkDSBXipLepEXuIZTS3riQ2Hz2jyEWhiCGYQ3hsaavsO3tg1lIXX79PeuYlJtOeSoS3bOs= X-Received: by 10.107.97.5 with SMTP id v5mr7512416iob.68.1506604007000; Thu, 28 Sep 2017 06:06:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.85.198 with HTTP; Thu, 28 Sep 2017 06:06:46 -0700 (PDT) Date: Thu, 28 Sep 2017 15:06:46 +0200 Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary="089e0825cefca7989d055a3f9498" Subject: SplFileObject and streams From: nyamsprod@gmail.com (nyamsprod the funky webmaster) --089e0825cefca7989d055a3f9498 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 ? --089e0825cefca7989d055a3f9498--