Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126238 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 qa.php.net (Postfix) with ESMTPS id 55A0D1A00BC for ; Thu, 30 Jan 2025 12:06:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1738238629; bh=oP3N2YUuKUO+gjasrqL+COkzyNkaOOdSzUiuDeKatKI=; h=Date:From:Subject:To:References:In-Reply-To:From; b=a2ARzK4YuDe5tJvxd3OqQPRn769rJHmZvSkhFzSEttZyLDx13w2RLPujQoxPFY8GZ lJvDvuxoq8YlE4C52OIXSnTY5S4MKD1vployUvAT3YjroMVWv0/G4e51lG9hx4Q0xI mqs1iWIXyikBvg226Hlky3y39yI3bHBGQHi9JZVPhMl3kVpu0CNz1+dpjWa/gVlo1r xj9cEO1Lw7/xZnm7OX4Bqvn4HzLR2T5cs5wRdOcDsTHzVvYsQ/Lfd27wA4cGDPNlqy ozI8U6YjGZXuhc9iH2RuIwtn79kIEJwGiQtPYfeBCtBeutVcV7+oaMvZxVSYSdeWy/ Bz8eIaRbzqJ3A== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id CA21E180083 for ; Thu, 30 Jan 2025 12:03:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from fhigh-a5-smtp.messagingengine.com (fhigh-a5-smtp.messagingengine.com [103.168.172.156]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 30 Jan 2025 12:03:48 +0000 (UTC) Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id 2479511400C4; Thu, 30 Jan 2025 07:06:36 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Thu, 30 Jan 2025 07:06:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beccati.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1738238796; x=1738325196; bh=/lNkpENIe1NERJXR4DpyW6M3lRk0U6Go7nQgXT0X6So=; b= Qu/nWiXa9cS6LXRDS6KqhDaHb5zNP5V5o2NXJL6iESdaYv+tXtsNOskJnoJ0MefJ hL4Bk0LhpVchHP5K6V/fy4FTCt2hfhT7uRB86UCDC8UdTb0d7bpzRCsTvI9ZwAgu hYZdxm6tQfR2SgvAB6lxRjEHywrUghTulHDtnXHymRIkI42C5eJi5OeiU/dtgKAH qKaWH1IGaEPa+6lTfx7qBz3cdY4K9NjFbATZtLf3l4cZ0M5V2khdDUo/VJ3PoRXM R6Y9FQDFfeK0UKGWDednOLJ9RDdHlXytK6mnjMlNY8hfGT1RyVHE87sUlr/yy1XX a5bBxw3flSw5+VJoZNrJ6w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1738238796; x=1738325196; bh=/ lNkpENIe1NERJXR4DpyW6M3lRk0U6Go7nQgXT0X6So=; b=mYeMJGr/2mBRuMIWm RoGpyCWVSjHmHz2bbYJadFrWmvmyvmNqDSH/EP6YJIZBSHllXWgh9WkX2TdOuv/V bqOlY7sP7qZ/A0e/FBHxt+Dl08/f+FS5fFPKDl27WiHa07mtL89/oAMUnhdyg0n+ Fdqi0/kpZ3df/u+hMtWzRaD2GTKiR3u4hYEA26aBRn+bjrMwyidrnpou1mJGSUZ0 OAMJihD5slx4xh5wApH6fbYIIzJ6MHuehOn0IgrHhiNYzVrmNfotyfpHX3V6lTi/ sxF6wYGEGYrYhF8MzK07DSQcMWr5lIIA/eQEqtOYY1hyTEXvEQLP7lwIR0UUp+3v j9Uow== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdehjeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfhffuvfhfjggtgfesthekredttddvjeen ucfhrhhomhepofgrthhtvghouceuvggttggrthhiuceophhhphessggvtggtrghtihdrtg homheqnecuggftrfgrthhtvghrnhepfedtkeekieetfeffvdeijefhledtudffgfeugefh kedvudelteelfeelhfefkefhnecuffhomhgrihhnpehphhhprdhnvghtpdhgihhthhhusg drtghomhdpsggvtggtrghtihdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpehphhhpsegsvggttggrthhirdgtohhmpdhnsggprhgtph htthhopedupdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehinhhtvghrnhgrlhhs sehlihhsthhsrdhphhhprdhnvght X-ME-Proxy: Feedback-ID: i6f4c46c2:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Thu, 30 Jan 2025 07:06:35 -0500 (EST) Message-ID: <78eb6c1b-ad20-4b74-b60b-f79623f436db@beccati.com> Date: Thu, 30 Jan 2025 13:06:34 +0100 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] RFC: Marking return values as important (#[\NoDiscard]) To: php internals References: Content-Language: it In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: php@beccati.com (Matteo Beccati) Hi Tim, On 29/01/2025 16:12, Tim Düsterhus wrote: > Hi > > Volker and I would like to start discussion on our RFC to allow "Marking > return values as important (#[\NoDiscard])". > > Please find the following resources for your reference: > > - RFC: https://wiki.php.net/rfc/marking_return_value_as_important > - Implementation: https://github.com/php/php-src/pull/17599 I reckon it's a nice thing to have, but to be honest I think handling it just during static analysis would be the best approach. Also there would be no need for a (void) cast to suppress the warning. Cheers -- Matteo Beccati Development & Consulting - http://www.beccati.com/