Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88825 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 41470 invoked from network); 15 Oct 2015 16:38:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Oct 2015 16:38:09 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.49 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.215.49 mail-lf0-f49.google.com Received: from [209.85.215.49] ([209.85.215.49:34519] helo=mail-lf0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C7/A8-23021-076DF165 for ; Thu, 15 Oct 2015 12:38:08 -0400 Received: by lfaz124 with SMTP id z124so35740320lfa.1 for ; Thu, 15 Oct 2015 09:38:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=zv44No3NRoZw6oTjsYUn2a7S5yNCE0zlQOQR2e7j80A=; b=OIPbHOux54ivV+1HQ+x5oW/ZMlyuzlqVqHotbBh8QIpKbJgDo7L90QTmh1FNI+3k8o RorIkECqQ33y7a3Z7Kx9sZV+wFTvEK1r5wXXJI5zaY7/QuLvwPY7siyjQem6I6K10i8S aflaZtBL0oHg5hdg/G5802et97RLrOIiDG8kUoPYlqEA90U32hTNXnWBRQkuPIG59ks0 fM7kflIx50DCLzriRR6vi1m3Wpt33DmGmn6gfujoWBLlclOcJoN38SOF2c6TJaBQPFxn Un4crgpmOg2GluBBd0KCCRM7pS19q23MPkOig461TkYhtwHOl6WpCrZmaEqECuHDgLcx DPHQ== X-Received: by 10.180.8.197 with SMTP id t5mr19550464wia.90.1444927085350; Thu, 15 Oct 2015 09:38:05 -0700 (PDT) Received: from [192.168.0.132] ([93.188.182.58]) by smtp.googlemail.com with ESMTPSA id ht5sm12078632wib.10.2015.10.15.09.38.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Oct 2015 09:38:04 -0700 (PDT) To: internals@lists.php.net References: <0A.C2.33697.6AECE165@pb1.pair.com> <561F7D17.5050306@gmail.com> <561FCD9F.10104@gmail.com> <90.58.23021.E85DF165@pb1.pair.com> Message-ID: <561FD658.202@gmail.com> Date: Thu, 15 Oct 2015 17:37:44 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <90.58.23021.E85DF165@pb1.pair.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: =?UTF-8?Q?Re:_[PHP-DEV]_[RFC]_Void_Return_Type_=28v0.2=2c_re=c3=b6p?= =?UTF-8?Q?ening=29?= From: rowan.collins@gmail.com (Rowan Collins) Andrea Faulds wrote on 15/10/2015 17:34: > Hi Pedro, > > Pedro Cordeiro wrote: >> I've been thinking about what PHP should do when accessing the return >> value >> of a `void` function, and so far, I think the consistent thing should >> be to >> get NULL, while throwing an E_NOTICE. > > We could do this, but I do wonder if it might cause a lot of E_NOTICEs > to pop up for existing code, assuming we applied this to built-in PHP > functions. > > I'm not sure. The way Pedro described it, it wouldn't apply to any existing functions because they wouldn't be declared void. Obviously, type hints for internal functions are a bit weird anyway, but there's no reason to assume that every function documented as void would suddenly be annotated in the Engine as such and start returning notices.