Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77411 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8504 invoked from network); 21 Sep 2014 09:09:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Sep 2014 09:09:14 -0000 Authentication-Results: pb1.pair.com header.from=kris.craig@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=kris.craig@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.174 as permitted sender) X-PHP-List-Original-Sender: kris.craig@gmail.com X-Host-Fingerprint: 209.85.214.174 mail-ob0-f174.google.com Received: from [209.85.214.174] ([209.85.214.174:58090] helo=mail-ob0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F7/80-03322-9B59E145 for ; Sun, 21 Sep 2014 05:09:14 -0400 Received: by mail-ob0-f174.google.com with SMTP id m8so2931503obr.5 for ; Sun, 21 Sep 2014 02:09:10 -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:to :cc:content-type; bh=04DfrNkAnLOCxSYClSg+TGrChi6DlBps/YOUsafyKBk=; b=ixK9hZoMhxPwyiSK39So7HTw+w7YR6OsfZxyfihI4raSE/Y9mN9oWxKNhiB9CBVOAI 1/blRE9lOwgDtNuzjS2R30We9K6Ml7CU/8kXnBEKniR58dUuI6RV09fFhVPWux5TxrNI B2wUuLGVx7zelAZd4lakB9BOhkXOvLCHBUo+426cq4X9QtQAjpkKgotBcQWwkaqrLmcd LROXki5IAzedRMbWA4dIW3G1hsE2F9gAChFtcnKJMP9G4cnkBzYIwK4Njp+O9HuB4YcQ ysSGNBXYwKdn5JEy6SnmjLgl0OtqVmzv94G3z11sLuPyA1vUHFk8ldvZXAObHWnA/pX4 wO8w== MIME-Version: 1.0 X-Received: by 10.60.51.5 with SMTP id g5mr11515053oeo.19.1411290550707; Sun, 21 Sep 2014 02:09:10 -0700 (PDT) Received: by 10.202.227.206 with HTTP; Sun, 21 Sep 2014 02:09:10 -0700 (PDT) In-Reply-To: References: Date: Sun, 21 Sep 2014 02:09:10 -0700 Message-ID: To: Michael Wallner Cc: PHP internals list Content-Type: multipart/alternative; boundary=001a11c30caaf32e7505038faf0a Subject: Re: [PHP-DEV] [RFC] Change checkdnsrr() $type argument behavior From: kris.craig@gmail.com (Kris Craig) --001a11c30caaf32e7505038faf0a Content-Type: text/plain; charset=UTF-8 I checked and it looks like E_WARNING is what we currently throw for that. Should we consider changing that to E_ERROR? I mean, if a function *requires* an argument that's missing, I don't think we'd want that script execution to continue. What's the reasoning behind the current behavior of just throwing a warning on broken function calls like this? Are we just mimicking behavior in other languages or something? I'm sorry if this is a stupid question, but I honestly can't figure out why it's preferable to only throw a warning on these. --Kris On Fri, Sep 19, 2014 at 11:05 PM, Kris Craig wrote: > > On Sep 19, 2014 10:50 PM, "Michael Wallner" wrote: > > > > > > On 20 Sep 2014 04:15, "Kris Craig" wrote: > > > > > > > > > > > From what I can tell, there are valid arguments to be made for both, > so I > > > would love to see some discussion/debate here regarding which solution > > > should be implemented, as I'm currently undecided. Also please feel > free > > > to point out any areas of improvement for the RFC itself. > > > > > > > Functions don't throw E_ERROR on missing argument. > > > > And ANY is about as bad as MX. > > I can fix that. What would be the customary one to throw for a missing > arg? > > --Kris > --001a11c30caaf32e7505038faf0a--