Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87921 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99728 invoked from network); 26 Aug 2015 03:18:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Aug 2015 03:18:24 -0000 Authentication-Results: pb1.pair.com header.from=scott@paragonie.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=scott@paragonie.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain paragonie.com from 209.85.212.178 cause and error) X-PHP-List-Original-Sender: scott@paragonie.com X-Host-Fingerprint: 209.85.212.178 mail-wi0-f178.google.com Received: from [209.85.212.178] ([209.85.212.178:35854] helo=mail-wi0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 49/91-23604-0003DD55 for ; Tue, 25 Aug 2015 23:18:24 -0400 Received: by wicja10 with SMTP id ja10so31541439wic.1 for ; Tue, 25 Aug 2015 20:18:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=b24B6IUPjORwfsLJEgmcVE6+tOYGsEqr5Aj8RNl4RQ4=; b=WfUZxLrHtcUipfl5tizN03M80Wv/2MZQJJvpOPca2/quL+R0h3bM7+hW0JjXiacG+V wlkasSsTCVrSqmEZMgCb1Rqqp+gy5g6/ClNhQKU0MbJcoXGCnbxaSe6O/9POrtSt2QfJ fNkfvCVvKuKIFgQb8yHO6BzwNQW6MlBDvV5IWcL7Gfx2+/0OEI8hSSq99GWGiIA3fiF2 mV6U0ih8DI8hiIaz8a2Ja9XOqEJjgLnmft9P4YZfpKJRGRZlsbF3d8D6jy5bnlorsHJj pG/VEHisUrd11D2QF2NMHerL3/iq39AnzKXd4qtARib4Kx8WLBVDuFE5NR1eDidnIswi d7iw== X-Gm-Message-State: ALoCoQm7PWXDl9p8E6Xm7lHZWdHhucBn1iHb42Mn+q4LyhjI8ZESoE2ED+PWpPsZM9ibiTJoLL59 MIME-Version: 1.0 X-Received: by 10.180.206.8 with SMTP id lk8mr796328wic.12.1440559101603; Tue, 25 Aug 2015 20:18:21 -0700 (PDT) Received: by 10.28.133.67 with HTTP; Tue, 25 Aug 2015 20:18:21 -0700 (PDT) In-Reply-To: References: Date: Tue, 25 Aug 2015 23:18:21 -0400 Message-ID: To: Sherif Ramadan Cc: PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] PHP 7.1 - Address PHPSadness #28? From: scott@paragonie.com (Scott Arciszewski) Because $x exists. https://3v4l.org/kUJtP Scott Arciszewski Chief Development Officer Paragon Initiative Enterprises On Tue, Aug 25, 2015 at 11:16 PM, Sherif Ramadan wrote: > Yes, because all undefined variables in PHP are implicitly null. As far as > PHP is concerned, if it's null, it's by definition _not defined_. Also, > still not seeing where a NOTICE is involved here? Those functions never give > errors. > > What is the usefulness of a function that merely returns true when a > variable is null? > > On Tue, Aug 25, 2015 at 11:13 PM, Scott Arciszewski > wrote: >> >> On Tue, Aug 25, 2015 at 11:11 PM, Sherif Ramadan >> wrote: >> > That's exactly what isset() does. isset/empty never raise errors. >> > >> > On Tue, Aug 25, 2015 at 11:09 PM, Scott Arciszewski >> > >> > wrote: >> >> >> >> Hi everybody, >> >> >> >> Would anyone be interested in adding another helper like >> >> isset()/empty() simply called exists() which would return true if the >> >> variable is defined in the current scope (i.e. without raising an >> >> E_NOTICE)? >> >> >> >> It should be a simple change to add this function but it's too late >> >> for 7.0 so, if there is any interest, I would respectfully put it off >> >> until 7.1. >> >> >> >> Scott Arciszewski >> >> Chief Development Officer >> >> Paragon Initiative Enterprises >> >> >> >> -- >> >> PHP Internals - PHP Runtime Development Mailing List >> >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> >> > >> http://phpsadness.com/sad/28 >> https://3v4l.org/2vrKG >> >> Not quite. >> >> Scott Arciszewski >> Chief Development Officer >> Paragon Initiative Enterprises > >