Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130508 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id 380211A00BC for ; Tue, 31 Mar 2026 09:24:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1774949045; bh=qFUeF9IVSRMs6HpR1/73t8XOiJ3c48XwwadsAH/osy0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ES93AefQ6QCec0jttU+38fIN/UAqN+PS5guCEu8uLgAtPhzWA+nNb3wuGKGkxoxVa 4011UxZy+ADSIKXtccpgSykTFio+70LIllmU9K5NU4+SVnmohs+Erghv8cyXZiIE8N DwwHjxFMpcoezKlAmT/OAN9bO4bbF6Qzy+Y3OJ+qli/bZ9KEQzxIoSgZ1oiQhUis6b 2xecdRbkfQADs5aBqRvDJcmubIrkyXbL9ENJEUZKbv+hCrYRjGKtDpOK1N2JLTMSO0 2cfOo7QHpPEjQJugOl6f1iGVtMIbbVVDD9H23KxClOXyAKFIjRyuV6SVjFuRfJ9UXX lgPdV5szhSwGg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 35AC7180077 for ; Tue, 31 Mar 2026 09:24:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 31 Mar 2026 09:24:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1774949030; bh=+UEUa+4B9/Hl00nwSiqDiBT+SCnHeqJd01I9EiXC9TU=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type:from:to:cc:subject:message-id; b=lXh6jd6qt1DASlg7+q8eBANS9DTq3S6qKSsCpAM/ftsksCMsUPhFPgZrll45MGUhE C85XlAcg9pj79Mha7DXeo6wAsi/s/UdWNChUp71DQZdglToqvTQO49YzauGzsd40X3 ugSrX7i79x78sHwBc7kcJOuOTHwtxDxjQ1H7cpYnICUXNANJwiniOLNOI1drCyg/0a 9UHM/mH3c1QbrPLjb+dBGKczq3mrf+PGqlL49uHF7WBkk7WntHx0EKIrkzmsfBVfRt p2N/eZ3EPy0hh7NdGvj+lWBBac3mPIuS7lHhFQp4YbZbcOyTAS0kKZ5mFey6GDw6J6 03zs58GxV7+iA== Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Date: Tue, 31 Mar 2026 11:23:50 +0200 To: Jakub Zelenka Cc: PHP internals list Subject: Re: [PHP-DEV] [RFC] Polling API In-Reply-To: References: <926a26a6-eb89-49aa-a387-6cc79caa29c1@bastelstu.be> Message-ID: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi Sorry for the late feedback, it's hard juggling all the different RFCs that are in progress to provide meaningful feedback. Am 2026-03-11 22:07, schrieb Jakub Zelenka: >> > I also think that there is not really much use case for user space to >> > implement their own handles so such interface would be used only >> > internally >> > anyway. >> >> This applies equally to interfaces and abstract methods. The abstract >> base class however will make it much weirder when a specific (future) >> handle might need to implement additional interfaces or abstract >> classes. >> >> > In addition interface would effectively expose the internal stream fd >> > which >> > is currently hidden and makes harder messing up with stream fd which >> > might >> > cause various issues. >> >> I don't understand that point. For both an interface and an abstract >> method, the method would exist on the child class and thus can be >> called >> by a developer. >> >> > Well if it is abstract, then the method can be protected and because > the > classes are final, user spaces cannot call it. But for interface I > would Protected methods of internal classes should still be accessible to Reflection. > need to make it public which means that StreamHandle would need to > expose > callabable (public) method. I know that I could just return 0 and use > different handling internally but I think this would be surprising and > created obvious inconsistency. I mean it's fine if the calls happen > internally but if the exposed methods are just dummy and return > nonsense > for user space, then I don't think it would be a good design. It's equally weird that there is a protected method that is effectively internally called by an unrelated class (Context) that is not supposed to know about it. Perhaps the correct solution would then be removing the `getFileDescriptor()` method from the public API entirely and change `Handle` to be an empty “marker interface” that cannot be implemented in userland (similarly to Throwable) to leave all options open for the future? Best regards Tim Düsterhus