Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88452 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29535 invoked from network); 23 Sep 2015 20:15:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Sep 2015 20:15:52 -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.182 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.182 mail-wi0-f182.google.com Received: from [209.85.212.182] ([209.85.212.182:36084] helo=mail-wi0-f182.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9E/42-13106-77803065 for ; Wed, 23 Sep 2015 16:15:52 -0400 Received: by wicgb1 with SMTP id gb1so222135348wic.1 for ; Wed, 23 Sep 2015 13:15:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type:subject:from:date:cc :message-id; bh=4gLgyc8wm8jVMotJH4kafD3SMb+bm7yyw8i0kJsV87M=; b=DOJi36iEy4U9Z+jGD6XqhMPRZTm7K9L39m8QpsidUVpa8vZaNSaqP5348dIlDvjmDP t4qDFmroVHHVdwCv6DCRoMPUD0h9U+ZShm1YB5yhoYvCVNUFwtYirwiCh8ZrkO4+g82k SfwUi9/o4WwEaJjCXItZ2WzoLz3Sp8rdLAludu/8DDFdI4N3Z7kU2OBifySFArliDuRK LcAOco+Szp/jAyQ5nkANmVKXhiKpU6rBkI+gFDJtwJvFjyy2PDgekppSLAAcHQ1qLqNf aBHmy3hzFNZ+swj/LVsuQ+PgNX+1JVMmoarh7/iXgsYqrXQpekPLl1myvk+Osv5olxPf Foyw== X-Received: by 10.180.101.137 with SMTP id fg9mr6020242wib.35.1443039348961; Wed, 23 Sep 2015 13:15:48 -0700 (PDT) Received: from [192.168.0.6] (cpc68956-brig15-2-0-cust215.3-3.cable.virginm.net. [82.6.24.216]) by smtp.gmail.com with ESMTPSA id ub7sm10218750wib.17.2015.09.23.13.15.48 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 23 Sep 2015 13:15:48 -0700 (PDT) User-Agent: K-9 Mail for Android In-Reply-To: References: <55E5EBBF.6020803@gmail.com> <0BA3A129-D356-4781-B6DE-E2B5A7924AE2@craigfrancis.co.uk> <55E6EC36.6090301@gmail.com> <9AF329EC-99A5-412D-A52B-432627A5520F@gmail.com> <6F4D91EE-B56E-4B83-B1AF-598C3F6897FC@craigfrancis.co.uk> <55F07BA4.2000204@gmail.com> <55F6B911.9080400@gmail.com> <96BE7F01-D04B-483B-B1A3-B45CED6DFCDC@craigfrancis.co.uk> <55F6F08C.1020506@gmail.com> <0BEF6D82-CB5F-49F6-A3A4-3267924A0CDA@thesba.com> <56009C96.5090504@php.net> <56013228.50504@gmail.com> <5601E01E.6080606@php.net> <56027C79.9020404@gmail.com> <5602BFB3.7090707@php.net> <5602DE27.4080500@lsces.co.uk> <5602EEF8.2090500@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Date: Wed, 23 Sep 2015 21:15:44 +0100 CC: "internals@lists.php.net" Message-ID: Subject: Re: [PHP-DEV] PHP 7.1 - Address PHPSadness #28? From: rowan.collins@gmail.com (Rowan Collins) On 23 September 2015 20:04:57 BST, Ryan Pallas wrote: > I dislike this because it makes refactoring harder. Just like when we >rename a dynamic property, we have to search for its usage as a string >(which may be stored in a variable), and then analyze if those strings >warrant being changed. Of course, strings in a variable may also be >created >dynamically, so simply searching for the name of a property being >renamed >may not find you all its usages. But variable_exists is only ever useful when using dynamic variable declarations anyway. If you have stable variable names which are amenable to static analysis, you should never need to know if they "exist" or not. What's more, the function is not dereferencing a variable to get its value, it is looking up a name in the symbol table, so the magic syntax that makes it look like you're using the variable is misleading. And yes, the same criticism is true of hasitem(); I'm not 100% sure if it's a good idea or not, only that it's preferable to a Swiss-army knife exists(). Regards, -- Rowan Collins [IMSoP]