Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88810 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98634 invoked from network); 15 Oct 2015 09:15:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Oct 2015 09:15:19 -0000 Authentication-Results: pb1.pair.com header.from=t.carnage@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=t.carnage@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.174 as permitted sender) X-PHP-List-Original-Sender: t.carnage@gmail.com X-Host-Fingerprint: 209.85.212.174 mail-wi0-f174.google.com Received: from [209.85.212.174] ([209.85.212.174:37567] helo=mail-wi0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A7/61-23021-5AE6F165 for ; Thu, 15 Oct 2015 05:15:18 -0400 Received: by wijq8 with SMTP id q8so119761802wij.0 for ; Thu, 15 Oct 2015 02:15:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=7qJlOhGPUpfI6aJtTkVC6RjVE3eWELq96nICOucTMpg=; b=dK04Ejp8GFV4Cwv/SPRM9CLbsg8fXAnhqOWLnDrebK0g1e35u34BhCNfgB945TMzY+ d6eBkvNkZbrP2n4tGRPnRtN71w4TbCVhlPKxlUOn3QACfs+DDSd764EdV39ABUO+NHHH EFAWy2bTLGt6Aek7qdHVpzPDqI36JEsPxYxKmDpATM3xhTjs8Cjjrlo1Rrzuwsyi3eCL NyO22NVJ2Zwsp/lfwGfdRWuu9aekYMGE4mU2PBswV0oCJkq41GR7Ztm5O20Lbs0KcUcK QVK7xvpyP4dKE6UORDuYaBeF84WLpcmvdivF+jiVWKTyRjRn5r9KQQGs8picd7CgFFTp Eu8A== MIME-Version: 1.0 X-Received: by 10.194.112.162 with SMTP id ir2mr10403072wjb.40.1444900514939; Thu, 15 Oct 2015 02:15:14 -0700 (PDT) Received: by 10.27.143.8 with HTTP; Thu, 15 Oct 2015 02:15:14 -0700 (PDT) In-Reply-To: <0A.C2.33697.6AECE165@pb1.pair.com> References: <0A.C2.33697.6AECE165@pb1.pair.com> Date: Thu, 15 Oct 2015 10:15:14 +0100 Message-ID: Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary=001a1130cca0edd03b0522211d64 Subject: =?UTF-8?B?UmU6IFtQSFAtREVWXSBbUkZDXSBWb2lkIFJldHVybiBUeXBlICh2MC4yLCByZcO2cGVuaQ==?= =?UTF-8?B?bmcp?= From: t.carnage@gmail.com (Chris Riley) --001a1130cca0edd03b0522211d64 Content-Type: text/plain; charset=UTF-8 On 14 October 2015 at 22:52, Andrea Faulds wrote: > Good evening, > > I'm reviving my Void Return Type RFC, this time for PHP 7.1: > > https://wiki.php.net/rfc/void_return_type > > Please read it and tell me your thoughts! > > Thanks. > > P.S. As it so (fatefully?) happens, I originally introduced this on 14th > February, and it's now 14th October, so it's been exactly 8 months! > > -- > Andrea Faulds > http://ajf.me/ > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > Hi, Semantically, I don't believe that there is sufficient difference between "returns no value" and "returns a value which has been defined as having no value" for us to care about it. The main difference you get between return type of null and a return type of void seems to be some extra fatal errors, for a developer there seems little value. From a user confusion point of view; PHP currently considers return; and return null; to be equivalent (in fact some code style checkers will replace one with the other) If (and only if) a function has a return type of void these two statements are no longer equivalent - one is a fatal error one is not. For any other return type specification, return null; and return; would behave the same. This in itself would be enough for me to be against adding a return type of void. (also could someone enable my wiki acc: carnage; sent an email ~a week ago and haven't heard back yet :() ~C --001a1130cca0edd03b0522211d64--