Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117334 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 72353 invoked from network); 15 Mar 2022 14:17:03 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 15 Mar 2022 14:17:03 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 06F9D1804D0 for ; Tue, 15 Mar 2022 08:41:49 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS29169 217.70.176.0/20 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [217.70.178.231]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 15 Mar 2022 08:41:48 -0700 (PDT) Received: (Authenticated sender: come@chilliet.eu) by mail.gandi.net (Postfix) with ESMTPSA id 2F91810000A for ; Tue, 15 Mar 2022 15:41:45 +0000 (UTC) To: internals@lists.php.net Date: Tue, 15 Mar 2022 16:41:45 +0100 Message-ID: <5550608.DvuYhMxLoT@come-prox15amd> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Subject: Re: [PHP-DEV] [RFC] [VOTE] Allow null and false as stand-alone types From: come@chilliet.eu (=?ISO-8859-1?Q?C=F4me?= Chilliet) Le samedi 12 mars 2022, 19:30:00 CET G. P. B. a =E9crit : > true is not a type in PHP compared to false, therefore it is not included. > I'm working on a proposal to add true as a type to PHP, but that's a > seperate RFC and discussion. Was there ever an RFC for adding literal values to the type system? This would solve all these problems by allowing stuff like: function foobar(): "foo"|"bar"|true { } C=F4me