Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:75244 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16800 invoked from network); 4 Jul 2014 07:43:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jul 2014 07:43:29 -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:36502] helo=mail-ob0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7F/11-06026-02B56B35 for ; Fri, 04 Jul 2014 03:43:29 -0400 Received: by mail-ob0-f174.google.com with SMTP id va2so1480354obc.5 for ; Fri, 04 Jul 2014 00:43:26 -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=SyGkpveLUz0oCClusT8P/MASjOhYZ7AYcOLtgJOD42k=; b=QyDojNErAs2R13ZlyH+2/p8yS9C/+Oo3yV4eiV1I0pvzdGdcAzDqYqi/TLZZpbvH2O 00khBzWLTw+afOQA0DsdMaRZhGi+HvKMkwocCU6jOe4qHctZunxFMuQRxGycfRYS4p7j uCantmxh5ofKzi5lRKtQVyhITHTmCwOAyKBEkuSz29KaR0vsQqKsujJV8Uuc43qbVWIM HDjM+8eGI6YGkM5JpkapRg3nrKr78vpMCyYs2HbPaqElFBVY05Brm+C1hz+R57DITRWX CRv+wvWjs8CVMvpG3ssoO33IR3VZ5XesDbnytAvWly4q1QJdkRMLgr+XbkrQqjqXOly3 sWWQ== MIME-Version: 1.0 X-Received: by 10.60.78.163 with SMTP id c3mr10359815oex.43.1404459805979; Fri, 04 Jul 2014 00:43:25 -0700 (PDT) Received: by 10.202.15.72 with HTTP; Fri, 4 Jul 2014 00:43:25 -0700 (PDT) In-Reply-To: <53B65712.2070207@sugarcrm.com> References: <53B65712.2070207@sugarcrm.com> Date: Fri, 4 Jul 2014 00:43:25 -0700 Message-ID: To: Stas Malyshev Cc: Andrey Andreev , PHP internals Content-Type: multipart/alternative; boundary=089e010d8d30d6395a04fd59472f Subject: Re: [PHP-DEV] not_null function From: kris.craig@gmail.com (Kris Craig) --089e010d8d30d6395a04fd59472f Content-Type: text/plain; charset=UTF-8 On Fri, Jul 4, 2014 at 12:26 AM, Stas Malyshev wrote: > Hi! > > > Not any that I'm aware of, and I personally have never used is_null(). > > I share your opinion that we don't really need is_null(), but with BC > > in mind, I don't think it would get removed. > > There's nothing to remove. Every type has is_* function, including null > type. If is_null() is offensive to somebody for some reason, that person > is free to not use it. > I'm not offended by it and I get that it was initially created for the sake of having an is_* function for each type. I'm just trying to understand why it's *still* there and why it's not a language construct. It serves no unique purpose and has a negative performance impact. What would be wrong with changing it from a function to a language construct like isset() and empty()? If is_null() were the equivalent of !isset( $var ) || $var === NULL, it would make a hell of a lot more sense than what's there now. --Kris --089e010d8d30d6395a04fd59472f--