Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92550 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56906 invoked from network); 20 Apr 2016 15:17:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Apr 2016 15:17:43 -0000 Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.176 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.161.176 mail-yw0-f176.google.com Received: from [209.85.161.176] ([209.85.161.176:35528] helo=mail-yw0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 94/3D-14036-59D97175 for ; Wed, 20 Apr 2016 11:17:43 -0400 Received: by mail-yw0-f176.google.com with SMTP id g133so50234193ywb.2 for ; Wed, 20 Apr 2016 08:17:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=du0g1cnQ1egEQx0Pi/LkhRPDL1wzr/YwMnrlRQpoeF4=; b=A8WV4nrZi8QMgvYbn024guP454cy3Pf6jMb/4FRUWUC6X+TDt8Z/faXgphFcJNNSXP lqUYMSrHqbrUf5b+2dkufgG4/jETZS3yDJnO2mD2Awfz4rwyIR9u99siE+2BhjysIjYQ nElIOfUYMdHZPgMxihr23YOeSpcm0uTMj0aWIFEXcfO4cGHQ1MfFaEn905G6ILxj5saG 8pFnT6leZBCp3Kpq93RucmG2p+FgOXAyFqdwcDD2+8F+uEyNWLh7dhR5MC6vyXMpjk64 b7KSpursJwVtuLAnOGOxmklvFtsihvPF1vCWJ6XkRHc4mN3RM57R/3KLQul2Nhz6KPKe 8lBQ== 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; bh=du0g1cnQ1egEQx0Pi/LkhRPDL1wzr/YwMnrlRQpoeF4=; b=E9gMGKMskRg2YgNxziDk3I4EhiaMLGEqaIyx6m4/mSBct5PvGJ/VrlWB50+Mf2BL2N 6dXXtWXkkQpQ0Tp78Q17ZGVgYbdAyEMnmPLJDACgh8QnthiX/ZFQYyoXGF/KkNM13f+K jmHhSJHvZpJVwIURb6+P2wurCCYSsjD3u4vUKsZOmVZ3/ZEZSxJIoqCyv+7kwKOI+t/y 8TKhhnLA0k53K/i3jn1D4LJwBZmySgjs6abmcTcudMxl44BktpN1xisxnIHsyhXKzoxu P72GqFiGTkPi7Gp/56AnlEGzfEkjFsJW5/lt7LUit9orfUYMi7AqFpbrWHpOhH9qGZfV OoYQ== X-Gm-Message-State: AOPr4FXjGhiQJc4XaENADTTe8JmQy8AwvmUY7rcxrAA8jQCOky7M6q7fl6KBuWjxIEofZ6JnL5h8dzOrkP0Duw== MIME-Version: 1.0 X-Received: by 10.129.40.147 with SMTP id o141mr5445220ywo.221.1461165459196; Wed, 20 Apr 2016 08:17:39 -0700 (PDT) Received: by 10.13.239.3 with HTTP; Wed, 20 Apr 2016 08:17:39 -0700 (PDT) In-Reply-To: References: Date: Wed, 20 Apr 2016 17:17:39 +0200 Message-ID: To: Adam Baratz Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a113f43dc2755a40530ec181f Subject: Re: [PHP-DEV] writing .phpt tests against IS_INDIRECT values From: nikita.ppv@gmail.com (Nikita Popov) --001a113f43dc2755a40530ec181f Content-Type: text/plain; charset=UTF-8 On Wed, Apr 20, 2016 at 5:08 PM, Adam Baratz wrote: > I'm contributing to an extension -- > https://github.com/jbboehr/php-mustache > -- and part of that has been little fixes for PHP7. I posted a PR to fix > how it was handling zvals that came in as IS_INDIRECT. The maintainer asked > if I could extend the .phpt coverage accordingly. The reading I've done has > made it sound like this is an implementation detail that would never > surface in userland. Is that true, or is there something I can do from > tests to make sure these code paths get used? > Assuming you're talking about hashtables here and not engine code, there are two places where INDIRECT values are used: a) The object properties hashtable (if used) contains INDIRECT references to declared properties in the property table. b) The $GLOBALS array contains INDIRECT references to variables in the CV table. That's the only two cases how you should be able to encounter INDIRECTs in "normal" extension code. (I think.) Nikita --001a113f43dc2755a40530ec181f--