Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127565 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 874D31A00BC for ; Tue, 3 Jun 2025 16:44:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1748968923; bh=6bL5L/s3yvTfs3NcKyzPO7dYS8LiIBZX57DRTmZ9Iw4=; h=Date:From:To:In-Reply-To:References:Subject:From; b=Y+9PvQ0xWeE3cVLxMmUUTiC2KrKR31g0wo4cyFwNShjbO5RK6iGtMuMUBVxivfPjT uNG3c36I8nnLsIOXCV1NIR7D7qVYwDBk8FnnB3Fa4wQjK+LczUgzdbY+eqMKq6Kjd8 ygWjrDmg8nxB7geitgOQed6fbWG/ZLpmEASiJfC1Zz8kHxHD/7X609TK7llonj3Lx1 ISNrV7iuhYmcreYas02xh0doV8q49vDBXIfWqQZnifIyj0NdpYYCT6RijkPerORvYO Nt3l1FpLq6nMymWcn8tgeRTxnDDd6EvuyN5xPdKXtvODDWv67TTEmUgz4+q7HNwySm Nf27fkggpt0sg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4D0C0180047 for ; Tue, 3 Jun 2025 16:42:02 +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=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from fhigh-a2-smtp.messagingengine.com (fhigh-a2-smtp.messagingengine.com [103.168.172.153]) (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, 3 Jun 2025 16:42:01 +0000 (UTC) Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfhigh.phl.internal (Postfix) with ESMTP id 6F62411400FD for ; Tue, 3 Jun 2025 12:44:05 -0400 (EDT) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-10.internal (MEProxy); Tue, 03 Jun 2025 12:44:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.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=1748969045; x=1749055445; bh=Jb8O1nNw0yF+2MlHvBfWY /+QklUxkXieKTeJY886dgY=; b=j4sJeuUgXzLpUh0nuH3pIUNJoduHPVLYIr7ZV BOXdjUhDWMO8bOmJ6ajaq/3AhZe/X8OmJxH0s3XEtsDqq71BnHUc0Kg7YLeX9qmW omzzvK8AJEy3ResJK5XpgELPev4CRxyJtChUpnoCq4TxMqcqWZ29F3rbHJbOvYWs 37ufeBBnG4iQe0U3qTDn/gvLiDetBMJqePhBgcF6EWSkVJZpn5prMS4Jniyw/+Yo K4ADjsdNj5jFLDOGnnasCobDZyAhbLCvkY19jewHEqvvAtkJiKcoywqu1fE86S0w zvhL9NoBWCPLq3+M8vCuXIXTA4g2/PASQUVSsu1YUd4+bwE8A== 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=fm1; t=1748969045; x=1749055445; bh=J b8O1nNw0yF+2MlHvBfWY/+QklUxkXieKTeJY886dgY=; b=pH23XJXFRwDHKToZE 4aSJ1vYWxuVeTRkZpeehncwqFq3+LCiibrE6pfnzsa5w/g/dRqQEIOy2SXBC8fKE a9a3JuRkvMNzIUCIzmeD4PM8XdaY3h9cNzdv30h4rMOVwNbhYyoHZIk+U13ihUCS sNQpXeTX5psUWZlu3jSube+7JLxvoxsjiph7gYv7QX5OWGH8KTqkmvMFfA2rVaTs MAAAeUdKCYvBFgS9rn+hZrI9O6gQ2jh1LpuJbQmDBYYvE1FSSkKuiEdRakKrV8QV lvEWkLvsH+iK0zLJNkieZnDGrifj9BL1DNaUZ1Viug/EotdB5fHKYyF3NVcd50Fu tecJA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddugdejhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenogfuuhhsphgvtghtffhomhgrihhnucdlgeelmdenucfjughrpefo ggffhffvkfgjfhfutgfgsehtqhertdertdejnecuhfhrohhmpedfnfgrrhhrhicuifgrrh hfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomheqnecuggft rfgrthhtvghrnhepheffvdetjeetvdfhtefgteehfeejieetheefhfehgfehkeetffetue ejjeejgffgnecuffhomhgrihhnpeefvheglhdrohhrghenucevlhhushhtvghrufhiiigv pedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlrghrrhihsehgrghrfhhivghlughtvg gthhdrtghomhdpnhgspghrtghpthhtohepuddpmhhouggvpehsmhhtphhouhhtpdhrtghp thhtohepihhnthgvrhhnrghlsheslhhishhtshdrphhhphdrnhgvth X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 0F782700060; Tue, 3 Jun 2025 12:44:05 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 X-ThreadId: T16a2df532cefedfe Date: Tue, 03 Jun 2025 11:43:38 -0500 To: "php internals" Message-ID: <8fb90c42-c9e6-488b-ac1b-853d1b5fad24@app.fastmail.com> In-Reply-To: References: <6Z2Ysh6MjYp1nyzuB0bTPJc5srObIcMRqt731JaQeXUJk1f_V_Yo2nRn8WvjI7er7pp7pIUE6WYl5pRwvYrtcrd07nCutyAqKPSsZHmrS-Y=@gpb.moe> <6ef43d7f-711a-46d5-b2a5-b6919feabd93@app.fastmail.com> Subject: Re: [PHP-DEV] [RFC] Transform void into an alias for null Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: larry@garfieldtech.com ("Larry Garfield") On Tue, Jun 3, 2025, at 4:33 AM, Christoph M. Becker wrote: > On 03.06.2025 at 03:36, Anton Smirnov wrote: > >> On 02/06/2025 20:01, Larry Garfield wrote: >> >>> The result of this RFC is that the following would no longer be an >>> error, yes? >>> >>> function test(): void { >>> =C2=A0=C2=A0 print "test"; >>> } >>> >>> // This currently gives an error, but you propose that it >>> // would change to set $val to null? >>> $val =3D test(); >>=20 >> There is no error: https://3v4l.org/UD4vn > > I guess that Larry meant `return` instead of `print`: > . No, I did not. I was sure I've run into places before where even trying= to assign the return value of a void function to something gives me an = error, but perhaps it was one of the many SA tools I use (IDE, PHPStan, = etc.). --Larry Garfield