Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117335 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 74975 invoked from network); 15 Mar 2022 14:51:22 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 15 Mar 2022 14:51:22 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 32BAE1804B3 for ; Tue, 15 Mar 2022 09:16:07 -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=0.8 required=5.0 tests=BAYES_40,SPF_HELO_PASS, SPF_NEUTRAL autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS30827 82.113.144.0/20 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from xdebug.org (xdebug.org [82.113.146.227]) by php-smtp4.php.net (Postfix) with ESMTP for ; Tue, 15 Mar 2022 09:16:06 -0700 (PDT) Received: from [127.0.0.1] (unknown [85.255.236.198]) by xdebug.org (Postfix) with ESMTPSA id 61BDA10C02C; Tue, 15 Mar 2022 16:16:05 +0000 (GMT) Date: Tue, 15 Mar 2022 16:16:03 +0000 To: internals@lists.php.net, =?ISO-8859-1?Q?C=F4me_Chilliet?= User-Agent: K-9 Mail for Android In-Reply-To: <5550608.DvuYhMxLoT@come-prox15amd> References: <5550608.DvuYhMxLoT@come-prox15amd> Message-ID: <64AC8731-10C0-4C77-8C10-34480F2624A5@php.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] [VOTE] Allow null and false as stand-alone types From: derick@php.net (Derick Rethans) On 15 March 2022 15:41:45 GMT, "C=C3=B4me Chilliet" wr= ote: >Le samedi 12 mars 2022, 19:30:00 CET G=2E P=2E B=2E a =C3=A9crit : >> true is not a type in PHP compared to false, therefore it is not includ= ed=2E >> I'm working on a proposal to add true as a type to PHP, but that's a >> seperate RFC and discussion=2E > >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 { >} It's called enums ;-), so yes!=20 cheers=20 Derick=20