Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129722 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 2526E1A00BC for ; Tue, 30 Dec 2025 08:22:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1767082973; bh=n9xuXRUdbIdwSl1KYdBML8nX3//WNuexIZwAu6+MomE=; h=From:Subject:Date:References:To:In-Reply-To:From; b=bIjB+73c7reqGRfZ+hS9Yy/Q2Ap0vWgijJh2OTCZTUZ2h4RwldaOcxqeFhEsiwUSV 2H+KqNGX2K1ESe+LGxPV2EO73nGJGRxFied+c/glEpJVjoD/oFnUaROvy3AcEQe1L6 MMHGpZBh4vRU7YfOGk9lrzWoDb9u2VWpWf4mrU7E0G6UJmks5mStN3KazglRP2zwUO jxA6Z86dJkmSMxE2VwiP13+R+upuSuHo0z27hj9okH6Cekv3BSFNAaleHhN2U9WsCS zZdHy/nj0C0MnaoxVyT0x4FSCFeDV6mklEJ8MXtGA+96NPeE3RPCRo1AxpsRGTatJW dNTNETQ4qfL5w== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 54F1B180047 for ; Tue, 30 Dec 2025 08:22:52 +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 mail.gna.ch (darkcity.gna.ch [84.234.28.114]) (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, 30 Dec 2025 08:22:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.gna.ch (Postfix) with ESMTP id 131192381220 for ; Tue, 30 Dec 2025 09:22:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cschneid.com; s=default; t=1767082965; bh=n9xuXRUdbIdwSl1KYdBML8nX3//WNuexIZwAu6+MomE=; h=From:Subject:Date:References:To:In-Reply-To; b=O6mYbqtSklW8HoTKlcHIJT7bmWKcgKJVK6i5S3tE8ypyejM2gC4n8R7hBbV0thNS6 YN5lqJYcDrrRlkVYq1cq7p5X2tAbOTjn2krc8iO03gscidQaIu2UR9jBY5JpTBbF39 dg20SxMBlVH197PX95coZ9Ftq0L87Jt2mApUdBp0= X-Virus-Scanned: amavisd-new at gna.ch Received: from mail.gna.ch ([127.0.0.1]) by localhost (mail.gna.ch [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PTKXQ_Qu5cRn for ; Tue, 30 Dec 2025 09:22:44 +0100 (CET) Received: from smtpclient.apple (unknown [IPv6:2a02:1210:2e2d:4d00:bdf9:23ae:e8c0:ffc8]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail.gna.ch (Postfix) with ESMTPSA id 19CE12381188 for ; Tue, 30 Dec 2025 09:22:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cschneid.com; s=default; t=1767082964; bh=n9xuXRUdbIdwSl1KYdBML8nX3//WNuexIZwAu6+MomE=; h=From:Subject:Date:References:To:In-Reply-To; b=ROxGFmUpGxFqsIm1qe591aA9twnll4MD/htwVThBMHkb2PexdgM9cYdoH6v0mFX5H 6+XK8salCvzULgzGTSrA4ab875fBUx+jjG7Ay+ZaUQkT02Mz+YrHJ0GkKU+49LldEy Gna0CrsinjzgGKaaWY7kNtLPwGFv9DdaABo0H1Xs= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.300.41.1.7\)) Subject: Re: [PHP-DEV] [RFC] Stream Error Handling Improvements Date: Tue, 30 Dec 2025 09:22:43 +0100 References: To: PHP internals list In-Reply-To: Message-ID: <7ECDE859-153C-4732-A3AB-716540489413@cschneid.com> X-Mailer: Apple Mail (2.3864.300.41.1.7) From: cschneid@cschneid.com (Christian Schneider) Am 29.12.2025 um 19:52 schrieb Jakub Zelenka : > - The storing of errors is done at the end of the operation grouping = and contains only the last grouped errors. So the function name was = changed to stream_get_last_error(). It returns just a single StreamError = which has a next property pointing to the next error if there is any. I assume the chaining was based on Exception chaining but the example = code under https://wiki.php.net/rfc/stream_errors#error_chaining looks a bit clunky to me and I was wondering if returning an array of = StreamError would not be more straightforward, i.e. one could then use = foreach, empty(), count(), array_first(), array_last(), array_find() = etc. instead of methods like while, $e->count(), $e->hasCode() which = would make it feel more idiomatic to me. But then again it might be a matter of taste and/or I might have missed = something. Regards, - Chris