Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129594 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 DDE051A00BC for ; Fri, 12 Dec 2025 12:29:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1765542562; bh=+LViyiWkdi3Nn/E8zLOWe3tkrwrDSvctyn3fMmiIF9w=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=lwin3fSuW3xB1QlAHB3OT6ZMvTu+IL6cQ3bXAGP3diL9CRIWpM3sv/BOsq7TvVgrR zCdw49/B/3nFr5WphHZoxnFyywVC3PGZ2FZ483Dm1x8iwbRRPj4ckA7z3yPRKMy7Bt C3G7jgsULXA4D8WbgKUfwic7Qfms+3MzRYtF9wG8eh7SHPwPZMJqdZnfCyrwyk6hOJ 0MWUcKDcspzf3zrLvykHvC8KWUnynYjqTRlJiGMQITFlaWKrDvXjE2uOSUvFHQ0RsQ 8gQtqhjp7lA2x+Xn695Q2UkVYA6t2m4KpqgrgIfBPnD3/nNz3A29ALkUABtCovmf6G xnR/7GB8XLbZw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 9F8F218007E for ; Fri, 12 Dec 2025 12:29:21 +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,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) (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, 12 Dec 2025 12:29:21 +0000 (UTC) Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-b7370698a8eso151335966b.0 for ; Fri, 12 Dec 2025 04:29:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1765542555; x=1766147355; darn=lists.php.net; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=+LViyiWkdi3Nn/E8zLOWe3tkrwrDSvctyn3fMmiIF9w=; b=iczB1Vc1hNpBxU3hlaZOdMch1oKV6uRKL8QgU3XbkDQHjDMyUOL5WQeFq0CQNfKfck Ov1q84VLNoJdtzw54cuvwp2+6aD0NHG5aorNzcJat5sNuqGUMigcuo63QoUCornWWdhd lOTMslfqCF6AJmBOMwnxIrrwkPhDtdov0uY29iFoQwTOTItcdIrBa4akBZfORTSBDHtI J9Ca6eMPGsqJ7yeabEDu+Ze+4NFvlHblD58PUhAmDGDQeDSjlGNsc2Q2T4xCM+ZxKfcu YjV6GdozwLT7Yuxxufyu3fnMBSHoN01C2iCAfiLukw4v9LPEu/uo108LbSHYGcl2Zzmy FOqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765542555; x=1766147355; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=+LViyiWkdi3Nn/E8zLOWe3tkrwrDSvctyn3fMmiIF9w=; b=FjDRlYojEJbXZXoTMdp+JdXhN/qfbdB9xGNrO7mbpsgHLzZv3lCm3lsR7QtrQD/66L fdSXmNsbokLiDaj4e8JiV0fh9+jOVpikWtkyuPXyiJe103Qg1Mm2767a357LQOWXoLPj Jr/vvEVnO5yV8Md6RYEST1wKRqgTMx42CibqPyvQR3IlY+YF894hK5OrhMY81pygxUc+ podKeD8DTcIIftA+Lvjsni5CcCFJHjED63867xmRl2PYwinM+ldafrHSrGOzVv9KZ1lm 7XCDVFT0yrnHZYMhy/vJXrPPZQPgsmHe5ZxIf1SiFpkckw1qpHaTjUluNrxuW4LOmzzG oE1w== X-Gm-Message-State: AOJu0YzAHhF9MdVUeM/E8cjMFLfd8RKV0JNPuvBQwgNbeBFrhVJQ4fTH Oho0RTPReDpUtMoqVnzZ/yMUtE6MssI5R4Gf69JWYWMC1spsaB7Qky1n9b5GVt3e1MV2y3jV/EH pCUj3AYOuf/tO+TFANc7sNEU7fyYkedyPIRjT X-Gm-Gg: AY/fxX4xd0ottxrmI8JoHJlJpvz+h61Ja05TlIHDb8ZsD9tmi6JUjPa1H/mERmyTKae btPlgNBdflKiHkoNo59zvK55F5LbpVklPdpj5pmYrnOl9zyP+ijU/SpEWohAt6eyIbDhWEiP00B ZkWQ48zPkvm4wTN6dJQBxdVlskIUQeWPf3n8Wwv0P+KUWNJdA7seoiv9HndU55lP2HpGHtikyQj aE1fiy1bei4zxDx8mj34m3Ik366HbVOft265crL1heNwJ+RsUObjOmQ7r4mzQML3WvzHwo= X-Google-Smtp-Source: AGHT+IGn8E3JReRAY/iDkSLCVSl4qbACrekLUeNi+tSLnq3ACcv70diPedfmdA11hrE1sineMvbPLCRyGzfVgQqG3d0= X-Received: by 2002:a17:907:2d0f:b0:b73:7b97:5bfb with SMTP id a640c23a62f3a-b7d238fc8f0mr181611466b.33.1765542554870; Fri, 12 Dec 2025 04:29:14 -0800 (PST) Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 12 Dec 2025 13:29:02 +0100 X-Gm-Features: AQt7F2p8AKXy0iIOrz1G6ZnwD-FwYzqsSWdax8vRc13HUmZUEHgUVlfoE2zYAPo Message-ID: Subject: Re: [PHP-DEV] [RFC] Stream Error Handling Improvements To: Jakub Zelenka Cc: PHP internals list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable From: arnaud.lb@gmail.com (Arnaud Le Blanc) Hi Jakub, On Tue, Nov 18, 2025 at 7:39=E2=80=AFPM Jakub Zelenka wrote= : > > Hello, > > I would like to introduce a new stream error handling RFC that is part of= my stream evolution work (PHP Foundation project funded by Sovereign Tech = Fund) : > > https://wiki.php.net/rfc/stream_errors > > Kind regards, > > Jakub Thank you for working on this. The RFC doesn't specify when exactly the error_handler is invoked (especially in case of non-fatal errors). Is it as soon as the error happens, or are invocations batched at the end of the operation? The reason I'm asking is because there is a long track of bugs related to the global error handler [1], and it's likely that the error_handler proposed here could suffer from the same issues. For example the error_handler can reenter the operation being performed, or change the state of the stream. For safety and simplicity, I would suggest that error_handler calls are delayed until just before returning to user code. [1] https://github.com/php/php-src/issues/20018 Best Regards, Arnaud