Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88844 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 84894 invoked from network); 15 Oct 2015 23:41:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Oct 2015 23:41:28 -0000 Authentication-Results: pb1.pair.com smtp.mail=korvinszanto@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=korvinszanto@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.53 as permitted sender) X-PHP-List-Original-Sender: korvinszanto@gmail.com X-Host-Fingerprint: 209.85.220.53 mail-pa0-f53.google.com Received: from [209.85.220.53] ([209.85.220.53:34159] helo=mail-pa0-f53.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8F/60-15862-7A930265 for ; Thu, 15 Oct 2015 19:41:28 -0400 Received: by payp3 with SMTP id p3so53351572pay.1 for ; Thu, 15 Oct 2015 16:41:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-type; bh=BDOTjyblysPdIia97tOs3r3/+4785Tz8/R0zygRNO6Y=; b=HQZNWR1F0O86GUlgXL3OMsWAY4ZureFN5BTrzmLQZMShAvjIDnGLVFSYxL1r30hkvS hNGOW/p9FZxHB0kPedQicFPKUkqOvSi2sLcqWfwp179hN/kQQn+ujOmgI1MfqPLOkluT fpTyEspFeoqIu7xpp/Ybh6mQDpOi5m8gUyJFYU6isqCb7yKyHjBxY0HaE29TLCZu2xSE ElUjiS29pf4Qr+10gkOFfboOb3pNrcLPmcT4aB0YKjt5bvuJmDji3jUaKdEyji9MJ8Cj J24A4DMr/sn2eTLHWUcTNv4wjsPR5O5P2UgO1SMzjrFCL3Pkag1/l2RgdSYd58vQhNU7 TsjQ== X-Received: by 10.66.147.104 with SMTP id tj8mr12717779pab.125.1444952484608; Thu, 15 Oct 2015 16:41:24 -0700 (PDT) MIME-Version: 1.0 References: <0A.C2.33697.6AECE165@pb1.pair.com> <561F7D17.5050306@gmail.com> <561FCD9F.10104@gmail.com> <90.58.23021.E85DF165@pb1.pair.com> <561FD658.202@gmail.com> <185707F6-9B57-4103-90C2-21246510FC67@gmail.com> In-Reply-To: <185707F6-9B57-4103-90C2-21246510FC67@gmail.com> Date: Thu, 15 Oct 2015 23:41:14 +0000 Message-ID: To: Rowan Collins , internals@lists.php.net Content-Type: multipart/alternative; boundary=047d7b6dcd6e90037705222d37a0 Subject: =?UTF-8?B?UmU6IFtQSFAtREVWXSBbUkZDXSBWb2lkIFJldHVybiBUeXBlICh2MC4yLCByZcO2cGVuaQ==?= =?UTF-8?B?bmcp?= From: korvinszanto@gmail.com (Korvin Szanto) --047d7b6dcd6e90037705222d37a0 Content-Type: text/plain; charset=UTF-8 On Thu, Oct 15, 2015 at 4:21 PM Rowan Collins wrote: > On 15 October 2015 20:33:04 BST, Andrea Faulds wrote: > >> 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. > > > >Why shouldn't it? For the scalar types, internal and userland functions > behave almost the same. > > Just for the same reason that an existing function that uses bare > "return;" won't automatically be considered "void" - nobody has explicitly > decided that that's the intent. > > Sure, internal functions whose value shouldn't be used *could* be marked > void, and those would start raising Notices if that was part of void's > behaviour. But there would only be a blizzard of Notices if someone bulk > updated every function in core which happens to return null, which doesn't > seem like an automatic part of creating a void return behaviour. > Especially if the whole point is that "void" signifies something more than > "always returns null". > > Since it's been mentioned a couple of times, I'd like to say that although > the documentation is official, I think it should be considered descriptive > not prescriptive - if it labels something as void, but the Engine doesn't > consider it so, the manual would be wrong, not the Engine. > Could we change the documentation for existing functions to return null, and start using void properly moving forward? Thanks, Korvin --047d7b6dcd6e90037705222d37a0--