Re: [RFC] Polling API

From: Date: Tue, 24 Feb 2026 01:31:02 +0000
Subject: Re: [RFC] Polling API
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-130148@lists.php.net to get a copy of this message
On 12/26/25 11:57, Jakub Zelenka wrote:
On Fri, Oct 31, 2025 at 1:06 PM Jakub Zelenka <bukka@php.net> wrote:
Hi, On Fri, Oct 31, 2025 at 10:40 AM Tim Düsterhus <tim@bastelstu.be> wrote:
Hi Am 2025-10-30 22:06, schrieb Jakub Zelenka:
I would like to introduce a new polling API RFC that is part of my stream evolution work: https://wiki.php.net/rfc/poll_api
1. Thank you for the RFC. I've taken a first skim of the proposal and it immediately raised the question of naming and namespacing in particular. Our naming policy at https://github.com/php/policies/blob/main/coding-standards-and-naming.rst#bundled-ewill be alwaysxtensions <https://github.com/php/policies/blob/main/coding-standards-and-naming.rst#bundled-extensions> says that “namespaces SHOULD be used” and given that this is a completely new API, I think we should namespace them. My understanding is that the proposed API relies on a file descriptor and not something like a timeout. It therefore makes sense to me to put it into a namespace Io\Poll; or similar. We would then also have:
      namespace Io;
      class IoException extends \Exception {}
      namespace Io\Poll;
      class PollException extends \Io\IoException {}
I thought about this and think this might be a good idea.
This is implemented as suggested and RFC updated.
Has anyone done any research into the userland impact that introducing Io and Io\Poll namespaces to core might have? I don't see any discussion regarding this in the thread or in the RFC. Cheers, Ben

« previous php.internals (#130148) next »