Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87931 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52458 invoked from network); 26 Aug 2015 11:37:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Aug 2015 11:37:43 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.169 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.169 mail-wi0-f169.google.com Received: from [209.85.212.169] ([209.85.212.169:37817] helo=mail-wi0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 89/A2-17883-505ADD55 for ; Wed, 26 Aug 2015 07:37:41 -0400 Received: by widdq5 with SMTP id dq5so12538625wid.0 for ; Wed, 26 Aug 2015 04:37:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=U1k+1CyV7iQqgKXzakCO3ug7OgpTEOzpQjJor/fq42s=; b=fyJxcwlda5QE1hmqjQ9SKF9yU5sADmpENm071HrQLluRaKx/dEEAbrtrotfT9jQOgI KOopXrVEkE1ipblLUIWj7FsaAfa88/7NsNAY/CF+LUdxfgStzMtiW+wffzU5rU1WbfaJ 1h6v4MglQUf92jDu74lOfzMM+nq3ZnXy+MdHHUuzoIBR7InHTxC0qs2WroXjwRPzH6uX yx1z4FyGFx82iO/eGqKWVQyyhlgGAqZ5+VQW95SCNGEpc9IHFzWVsFyP5RQRk04IcY2L xV2vIhaV5jPFRHbjwVrMkAT18n5nzE1tdqAwOoLYP9xQiY4IBYEoCsVNDflKxJqjFUQ7 qwmg== X-Received: by 10.194.191.129 with SMTP id gy1mr58057379wjc.86.1440589057877; Wed, 26 Aug 2015 04:37:37 -0700 (PDT) Received: from [192.168.0.83] ([62.189.198.114]) by smtp.googlemail.com with ESMTPSA id fn8sm7175840wib.2.2015.08.26.04.37.37 for (version=TLSv1/SSLv3 cipher=OTHER); Wed, 26 Aug 2015 04:37:37 -0700 (PDT) To: internals@lists.php.net References: <55DD4269.4090402@gmail.com> <6348DFA7-04BD-41BB-A500-17A8A531B56C@craigfrancis.co.uk> Message-ID: <55DDA4C9.9040603@gmail.com> Date: Wed, 26 Aug 2015 12:36:41 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <6348DFA7-04BD-41BB-A500-17A8A531B56C@craigfrancis.co.uk> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] PHP 7.1 - Address PHPSadness #28? From: rowan.collins@gmail.com (Rowan Collins) Craig Francis wrote on 26/08/2015 12:23: > > If you want some example of where I got this wrong... > > I have a config array [...] > > When creating a URL builder that allowed the query string to be passed in as an array [...] > > Neither were major problems, just a slight annoyance (i.e. identified and fixed before I committed the code). But I'm normally using an isset() as the proposed exists() function would work. Both of these example involve not an undefined variable, but an undefined array key, which is a much less controversial scenario. Fortunately, the function you are looking for already exists: http://php.net/array_key_exists Regards, -- Rowan Collins [IMSoP]