Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87941 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44695 invoked from network); 26 Aug 2015 18:50:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Aug 2015 18:50:41 -0000 Authentication-Results: pb1.pair.com smtp.mail=bishop.bettini@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=bishop.bettini@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.169 as permitted sender) X-PHP-List-Original-Sender: bishop.bettini@gmail.com X-Host-Fingerprint: 209.85.213.169 mail-ig0-f169.google.com Received: from [209.85.213.169] ([209.85.213.169:36980] helo=mail-ig0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 06/48-17883-F7A0ED55 for ; Wed, 26 Aug 2015 14:50:40 -0400 Received: by igui7 with SMTP id i7so19154052igu.0 for ; Wed, 26 Aug 2015 11:50:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=+XVtcYvcmFUmd8WB++Rf/tvFnCuHIyrSNOD23y72yOI=; b=lSAP2oi6KPuZ/DzQfZuaKc00prnR5FgWGFiGyqgfvUVcagfRcaIqkeNOQXDMGdzzez +paNVbap+dt3Z7AQoPMIorEhd8gI+kTUooOjYylYeCU0Uzl1HkVVH5i78XPwlueu+rY0 +wz4bn5SIyrYdtXJsjV8NQXLST8AKb5qqSKh6I4+YucNEmlXqVGEoDyH520BxAsHxmH4 0HDhMRPcD19/1m17iE9Gj9ybDQK2ZMpeA2yWslziAwcOr9pXe5Z0j3jgXHIgjgSElcSv uG2XiGxF8XJ0ChLyoAIGZPxHNzM5ZWXWbGqkXttH29yYkbhfLd8QaFNAC4Wb449qy4Ef LXVA== MIME-Version: 1.0 X-Received: by 10.50.73.98 with SMTP id k2mr13075262igv.96.1440615034471; Wed, 26 Aug 2015 11:50:34 -0700 (PDT) Reply-To: bishop@php.net Sender: bishop.bettini@gmail.com Received: by 10.50.235.46 with HTTP; Wed, 26 Aug 2015 11:50:34 -0700 (PDT) In-Reply-To: References: Date: Wed, 26 Aug 2015 14:50:34 -0400 X-Google-Sender-Auth: 98oPsd91I3W0kZgeXQgcMvRbRNE Message-ID: To: Scott Arciszewski Cc: PHP Internals Content-Type: multipart/alternative; boundary=089e01184e1a634d03051e3b531f Subject: Re: [PHP-DEV] PHP 7.1 - Address PHPSadness #28? From: bishop@php.net (Bishop Bettini) --089e01184e1a634d03051e3b531f Content-Type: text/plain; charset=UTF-8 On Tue, Aug 25, 2015 at 11:09 PM, Scott Arciszewski wrote: > 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)? > Agree with Rowan as he mentioned here: http://stackoverflow.com/a/18646568/2908724 Perhaps this idiom will solve your use case? array_key_exists('x', compact('x'))); https://3v4l.org/TLdZI Cheers, bishop --089e01184e1a634d03051e3b531f--