Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82668 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70583 invoked from network); 14 Feb 2015 04:57:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Feb 2015 04:57:43 -0000 Authentication-Results: pb1.pair.com smtp.mail=francois@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=francois@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 212.27.42.2 as permitted sender) X-PHP-List-Original-Sender: francois@php.net X-Host-Fingerprint: 212.27.42.2 smtp2-g21.free.fr Received: from [212.27.42.2] ([212.27.42.2:46727] helo=smtp2-g21.free.fr) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 45/D9-15073-6C5DED45 for ; Fri, 13 Feb 2015 23:57:43 -0500 Received: from moorea (unknown [82.240.16.115]) by smtp2-g21.free.fr (Postfix) with ESMTP id 0ED414B0143; Sat, 14 Feb 2015 05:57:32 +0100 (CET) Reply-To: To: "'Andrea Faulds'" , "'PHP Internals'" References: <680FB44D-B42D-4898-A28B-FA1C6E4D4D1A@ajf.me> In-Reply-To: <680FB44D-B42D-4898-A28B-FA1C6E4D4D1A@ajf.me> Date: Sat, 14 Feb 2015 05:57:34 +0100 Message-ID: <012c01d04812$bf8e7560$3eab6020$@php.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQJarA5HcqMrZRaN+23HbEjTjl9TGZvaxNog Content-Language: fr X-Antivirus: avast! (VPS 150213-1, 13/02/2015), Outbound message X-Antivirus-Status: Clean Subject: RE: [PHP-DEV] [RFC] Void Return Type From: francois@php.net (=?utf-8?Q?Fran=C3=A7ois_Laupretre?=) > De : Andrea Faulds [mailto:ajf@ajf.me] > I=E2=80=99ve written a small RFC and patch to add a = =E2=80=9Cvoid=E2=80=9D return type: >=20 > https://wiki.php.net/rfc/void_return_type >=20 > Please have a read over it. I think this would be a simple, yet useful = addition. That's a nice addition and a beginning to distinguish void from null, as = I imagine the function still returns null. Now, what about making void a real zval type ? It would open a lot of = possibilities. Unlike null, conversions from void would raise an error. = It would also be rejected as argument input type but could be used as an = output type when arg is passed by ref, it could be the default type for = return_value (huge BC break here) and so on... There's a need for a real 'no value' type different from null, as null = has too many uses. If defined correctly, it can be a powerful addition. Fran=C3=A7ois