Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94891 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56723 invoked from network); 7 Aug 2016 07:54:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Aug 2016 07:54:39 -0000 Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.181 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.192.181 mail-pf0-f181.google.com Received: from [209.85.192.181] ([209.85.192.181:36382] helo=mail-pf0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 26/AE-33134-C39E6A75 for ; Sun, 07 Aug 2016 03:54:37 -0400 Received: by mail-pf0-f181.google.com with SMTP id h186so109353489pfg.3 for ; Sun, 07 Aug 2016 00:54:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=37V5fcPS5mUhfSJZoEe9HsMZd6N5Ts1HIiYzMnQ2gnY=; b=KpEjnAQqzUzjvzhIxE4cj0GTnWRROqFqVHyavQMfAXhjoR/z2Gnt+NzUauMCsOw6ZG cQ7ib2P9nE+N4OFICHUeVmu5iyoBfXJ7QR+rWoWKftlGGSzpnvb9MhMMEJmwc4fCfdor pZC9z0VQrN2qdDkkQT3NZs9bsndfPg1iiBqBVIqHCAcOt1tIanyMwV328eBk04e9H41v mrwbVJYmXkCUFsu6R/GM6fWY0xAA7k9/1Eh/vZBLDVjS2StU+zBHE4rJPMyY06ELojGu ugujdGnlAL2IXvnvV4aVlzuIAramrv4eMxfO5dQaYwIuKG/fy0mdYwNaXs/sr6glrLoU NQkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=37V5fcPS5mUhfSJZoEe9HsMZd6N5Ts1HIiYzMnQ2gnY=; b=DtoKwCyoxm+VUvCfqXoArLQ9AB/qc+dCDcb546CueQw7/A6MD6mfuBAbn/nANe5Um0 vsc5d3hVdXgk0y9Ll3jPPPAD/Yq+utFrrZtxf/7sLZPNdupo1OhVrm10TwiT7/lLw2/f OPVj8iZikA/F2nP4M9Lye+5nyjZzEzObB3bVA14Wn6yPLcvAGPcuIPnvMLbjSVjFtVCP oyem/V/zur8QZwqUry3leb58KEf5GbACVRMhNeLc0QEDlVzXlCLWAQRQd3wtnYiEvyCw WdAjbSOhkyXV0g3EYUXkFHzchwHnHrrJQ85ePiZtQjONyoECuhU4xlKQAjm36QyvnsUr bLGA== X-Gm-Message-State: AEkoouuXJeLGsmPcFvg7IYr69n9kzJSjg28GQoSLQE8Q8sUV2b4+lmhLFbRHC/PtQlTGFo3dnbUd6TddC/CTjw== X-Received: by 10.98.31.219 with SMTP id l88mr151544714pfj.155.1470556474059; Sun, 07 Aug 2016 00:54:34 -0700 (PDT) MIME-Version: 1.0 Sender: morrison.levi@gmail.com Received: by 10.66.24.42 with HTTP; Sun, 7 Aug 2016 00:54:33 -0700 (PDT) In-Reply-To: References: Date: Sun, 7 Aug 2016 01:54:33 -0600 X-Google-Sender-Auth: U4FsO3uX5mxNFHPQlXWnRsUF1UQ Message-ID: To: Davey Shafik Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a11476e0e4230f20539769c08 Subject: Re: [PHP-DEV] Undocumented Nullable Return Behavior From: levim@php.net (Levi Morrison) --001a11476e0e4230f20539769c08 Content-Type: text/plain; charset=UTF-8 On Sun, Aug 7, 2016 at 1:07 AM, Davey Shafik wrote: > Hi internals, > > In the nullable types we do not allow implicit return null/return with no > value to fulfill a nullable type. > > - No return will result in a TypeError when executed > - Return with no value will be an actual fatal error, which I believe is > due to the fact it's not found at runtime, should be a TypeError or > ParseError if possible? > - Return explicit null is fine (as expected) > > See: https://3v4l.org/h6IYF > > I believe the first two are contrary to PHP's "null is always returned if > nothing else is". > > OTOH, it makes sense as it's the entire reasoning behind return void vs > return null. > > This behavior is completely undocumented in the RFC. > > It's definitely something we should make an explicit decision on for the > language spec if nothing else. > > We should also make any decisions on this prior to beta3 in < 2 weeks. > > Thoughts? > > - Davey > hello_2 looks particularly fishy to me; to my knowledge we did not pass any RFCs that would dictate such a message. However I have not been as active as I'd like to be so perhaps I just missed it. --001a11476e0e4230f20539769c08--