Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129035 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 B7CE21A00BC for ; Fri, 31 Oct 2025 23:12:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1761952333; bh=0L4pQWVoJLejJi6kTquNY5dQvboGuzaMkw3olipWR7g=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=R1oRlcKPgD0U1eAJVSEcYBP55JA9BPdPlULAbAbITuYTQAPEHrTulFb1HKJVpD5Rm otzB4rQZCj9GSbyJdCWcvrpU1h7ypDhd4EV7WSjd44PC1ukxlDGIaeoS1/H/sgmNzi 5jctYZdWlAeA83Horfv0HOTkO5oK0SsPjZUpBq6plGM5PW6onFa1KhxnJ7ho1sAqCe B1m51OQkfXGusO6SnffnOlGqbM+gYqNUr9wcNBFxjCC63oxHDnITCDkf966R0IA0LZ zoDLXXvtIzY6DOdsE4NhBsKRdzgktkTpgGjijQL1D/K19muSSZjk91b57eCAGm7HYc xEiB5+wtZDfRA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4B89C1801EC for ; Fri, 31 Oct 2025 23:12:12 +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=1.0 required=5.0 tests=BAYES_40,DMARC_NONE, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-oi1-f177.google.com (mail-oi1-f177.google.com [209.85.167.177]) (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 ; Fri, 31 Oct 2025 23:12:11 +0000 (UTC) Received: by mail-oi1-f177.google.com with SMTP id 5614622812f47-44f967533b3so701492b6e.1 for ; Fri, 31 Oct 2025 16:12:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761952326; x=1762557126; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0L4pQWVoJLejJi6kTquNY5dQvboGuzaMkw3olipWR7g=; b=HpDKXCc381KEYzc23IcKOhaKkCeSIGAr6z3Owqfc9OiOvMiSgj+2VFHM7HTVOwvI2A pU+/imCmuNSSPzwgtsLEGUFKaFCdUSCt4GPoUHvtC2FuMPs39kGndckv491Oj0xDnlFF NosS36kBIlOkj4C/p+fptPhR3H28u3CVPqOFh3TpuwIkZmEFiMCayIFpbvielM9ujdoj nTP+Fcq3jsAQ+ifQ3ZgVHvNfOa+qW9a2C0RGCZs5iafllwAt4wr8vJjI0zfRQLj1jL7W OkL7fD6yCz8zxWKAGOP1XmOoH0cLLx01KGK7ZEaa/gcSDw9o6pOzcFdOtXX/Yoxm92pn haLw== X-Gm-Message-State: AOJu0Yyy2NQm0wxTiv5j99lj4Ad6w8Bbaa6Jfx/h977V0VHEvnc5IOwb H69djl7wNsCSgDxVEIawvN6lgcyR2RwxfnKN+U0V1o4IFOTQzTNRNsWpNW8wc9sfUKFJxdE+hsa 3gCSQk+J1dEmlIgNCZly/4t2SRE0gObGjgQ== X-Gm-Gg: ASbGncubZp5htSjBH7gTnV+LV30y5DYCmgof6QqJoh3My/7PDDO0GXo6Lz1DDHo5Sk/ R3CucJnRzADKOZwdSzbveqQqmx1pBOCqq2Ftp3AF4YpL0eZ/6fICmjeDq4oGgpJYsRw+lwOfLdg /MgUYw1rJqS+bxDbatW2pcxygbM8DVt4MiPQS9pDO08vkWLxVERUs1MiLBsO9wpAc+2TE2huHQ4 UkXE+EZFcSj+EljLB18QSJRlaC9p0JlFuYjffF/3hyJHvxS4bctvknRiDM= X-Google-Smtp-Source: AGHT+IEl+EZxRT7+XVGCTlurQZAJlUd0YXZs6N0AIFze/RvuOHoXk/a61JHkFlcxyJzjSBHK04umbeBZLWTpBaF8r+s= X-Received: by 2002:a05:6808:1407:b0:441:c8af:2931 with SMTP id 5614622812f47-44f95fd58e4mr2263083b6e.42.1761952326052; Fri, 31 Oct 2025 16:12:06 -0700 (PDT) Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: In-Reply-To: Date: Sat, 1 Nov 2025 00:11:54 +0100 X-Gm-Features: AWmQ_blCZbs-fepZ7xByP1JjCSY7It1vYHkr-ppvAk7H56x8UM_cGZyy7Sj5hok Message-ID: Subject: Re: [PHP-DEV] [RFC] Polling API To: Dennis Birkholz Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary="00000000000081709406427c7e51" From: bukka@php.net (Jakub Zelenka) --00000000000081709406427c7e51 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, On Fri, Oct 31, 2025 at 11:58=E2=80=AFPM Dennis Birkholz wrote: > 1. Why not use a "Pollable" interface that will be implemented by > Socket, CurlHandle, etc? That would allow to directly use the "resource > classes" without a step in between. > I actually planned to use interface initially but there are few issue with it. - as I mentioned above, not all handles will always allow using file descriptors (e.g. timer for kqueue) - abstract class allow internal api defintion and not calling the PHP functions internally (that's how the above can be handled as well) - it would require exposing the actual fd numbers for streams which after some thinking might not be best idea because it would make easier for people to have two streams for a single fd which might cause issues with filtering, buffering and so on. > 2. Is there a reason why mysqli (when using async queries) is missing > from the Future Scope list? Or did it just not come to mind? > I put there just those that I actually plan to implement and are relatively straight forward. For mysqli it might require some abstraction to get the mysqlnd stream so would need to check it out first. In other words I haven't fully investigated it yet. But it should be probably added too. Kind regards, Jakub --00000000000081709406427c7e51 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

On Fri, Oct 31, = 2025 at 11:58=E2=80=AFPM Dennis Birkholz <php@dennis.birkholz.biz> wrote:
1. Why not use a "Pollable" interface that will be implemented by=
Socket, CurlHandle, etc? That would allow to directly use the "resourc= e
classes" without a step in between.

I actually planned to use interface initially but there are few issue wit= h it.

- as I mentioned above, not all handles will= always allow using file descriptors (e.g. timer for kqueue)
- ab= stract class allow internal api defintion and not calling the PHP functions= internally (that's how the above can be handled as well)
- i= t would require exposing the actual fd numbers for streams which after some= thinking might not be best idea because it would make easier for people to= have two streams for a single fd which might cause issues with filtering, = buffering and so on.
=C2=A0
2. Is there a reason why mysqli (when using async queries) is missing
from the Future Scope list? Or did it just not come to mind?

I put there just those that I actually plan to implem= ent and are relatively straight forward. For mysqli it might require some a= bstraction to get the mysqlnd stream so would need to check it out first. I= n other words I haven't fully investigated it yet. But it should be pro= bably added too.

Kind regards,

Jakub=C2=A0
--00000000000081709406427c7e51--