Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88254 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 28313 invoked from network); 16 Sep 2015 18:15:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Sep 2015 18:15:46 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.179 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.179 mail-wi0-f179.google.com Received: from [209.85.212.179] ([209.85.212.179:34330] helo=mail-wi0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3E/44-04557-1D1B9F55 for ; Wed, 16 Sep 2015 14:15:46 -0400 Received: by wicfx3 with SMTP id fx3so85210078wic.1 for ; Wed, 16 Sep 2015 11:15:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type; bh=QttbVrQHGn6fpmc1j2Gl+VcAUi1JVbOq51aPtn1F8uU=; b=XQ6Zve4qegKxQdMOGFWa/nufBP7gIsV+eFRqNoSBHXHMdFOWa39gajNT5q7n232PAO 0ppBpUIFDKLeQil9+0u+Iun+p9wcS2UuImVfhMQacvY6oVVqtLGQlnUNVVSegBeomQwp IWVi4dp0/ZXaxt8V5SK4dKV589F+4Mbu+GWRx/bsEfns/Ptn2dg7kT42JqMj2ZIJUTFC b/pCBlncPZh6TEzXR/Od7pjVbrtfBjEU/KfVhQyAk4cJ29f89JZhg7f4Tsae9LqkEsF/ mP8bHoZ7QLieS2yYW1l4d9hrzLXsqbiRQ6Ad6yJN7LmPbBqA4O7YWJcBX7LW7q+XYy3X Krow== X-Received: by 10.180.99.5 with SMTP id em5mr21528341wib.43.1442427342498; Wed, 16 Sep 2015 11:15:42 -0700 (PDT) Received: from [192.168.0.127] ([62.189.198.114]) by smtp.googlemail.com with ESMTPSA id fr10sm5747848wib.14.2015.09.16.11.15.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Sep 2015 11:15:42 -0700 (PDT) To: Robert Williams References: <55F97251.3080706@gmail.com> <51BBFC90-C83C-4112-90B5-E04C27F1746E@thesba.com> Cc: "internals@lists.php.net" Message-ID: <55F9B19E.3090209@gmail.com> Date: Wed, 16 Sep 2015 19:14:54 +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: <51BBFC90-C83C-4112-90B5-E04C27F1746E@thesba.com> Content-Type: multipart/alternative; boundary="------------090206050002050104060202" Subject: Re: [PHP-DEV] PHP 7.1 - Address PHPSadness #28? From: rowan.collins@gmail.com (Rowan Collins) --------------090206050002050104060202 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Robert Williams wrote on 16/09/2015 18:27: > an even more common scenario is config files that are supposed to just > define a bunch of standalone variables, which is a very common > pattern. If you’re writing code that relies on those variables, or > you’re writing the code that’s supposed to pull that file in to begin > with, it’s smart to make sure all the variables actually got set, and > if not, display an error to the user to go fix the config. Sometimes, > isset() works for this if combined with a null check, but it fails in > cases where null is an acceptable value. OK, that's a reasonable example, though I'd say it's still very much an edge case. It requires the following to all be true: - the config file defines bare variables rather than array or object keys - the variable in question has null as a valid value - the variable in question is mandatory, with no default value I will admit that exists($foo) would be useful in that situation, but it doesn't feel to me like such a common or useful scenario that it justifies the language changing to suit that design, rather than the design changing to suit the language. Regards, -- Rowan Collins --------------090206050002050104060202--