Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98537 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 50047 invoked from network); 15 Mar 2017 14:53:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Mar 2017 14:53:21 -0000 Authentication-Results: pb1.pair.com header.from=php@golemon.com; sender-id=softfail Authentication-Results: pb1.pair.com smtp.mail=php@golemon.com; spf=softfail; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain golemon.com does not designate 74.125.82.50 as permitted sender) X-PHP-List-Original-Sender: php@golemon.com X-Host-Fingerprint: 74.125.82.50 mail-wm0-f50.google.com Received: from [74.125.82.50] ([74.125.82.50:36235] helo=mail-wm0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 24/FE-38004-F5559C85 for ; Wed, 15 Mar 2017 09:53:20 -0500 Received: by mail-wm0-f50.google.com with SMTP id n11so89659099wma.1 for ; Wed, 15 Mar 2017 07:53:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=golemon-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=dG8lrzialF+JMnykJ9SgBVN2WAH8Pf1hlMmmwvSeoOc=; b=EaNYeIUpnLiL8CmOI6wPbxP+gDEdJvqR8/eyd14+tbdVuPs2K8KPUWx5Mj68YFmyP7 vmXMzVShFe87s/5U7gPBa6+OEWX1+aXB8B4uePtTe8KCXYC1gDWJVuSsX8sQhxFUH72E e5xm78aluoEQqLJTF2WZSkuXa5BKYPXF/hQtEX46u26Q8oTY6kZQW3xy96Seu/V4If16 b28V1mScg7lE51g6QZo9UtaT6eiEZ++j7tys2D2t8UFu4kwx//yyHUr4ZK5b/PZveOJq xsIgAr0/KXcpgyRU64ZvCzs8Wl5evO8ijMoaJB+LaPQfJaTorMf3iDL5YaHxuYWsvvm0 aeyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=dG8lrzialF+JMnykJ9SgBVN2WAH8Pf1hlMmmwvSeoOc=; b=Tuh+4Rn5UUCk5m9V1tUChc6hmSkQTPfp/cBQqsAvK1fpSRAtrhGI3IEsiz0HJ7/DjK zFXR9hPfz+BRFnprI+zPCvXbj4Sm2YFYT4QMcxxlmBTM41mKJ5l82lXcqVVhfiV0rp/c k5f2mq8A8Sup6IKtjWToXYm1KA6g8ms0c51jl7K+qNtyUwdUHzL/1Gq81p9TxQhekNso DkyGCuwI+clRbrn35/68P05REUIv38RPbvZ1iungmDSn1ZT6uxgeEHzyKk+pY4JhGYer heGKlATafPY41P+G7Ah4pq4pv4NtiDxWhdS1gWDqIQyWt62HwoN18rQYjelga/ES6/oP qpJg== X-Gm-Message-State: AFeK/H2xzmMQvpik4ovJzYTslkiDDwlaC6nzwhp9i/rfbmU9rbYvZ/oGRcxxQalnAZBU+Vwzd4JNJFna39Oa+w== X-Received: by 10.28.131.65 with SMTP id f62mr4818593wmd.4.1489589597113; Wed, 15 Mar 2017 07:53:17 -0700 (PDT) MIME-Version: 1.0 Sender: php@golemon.com Received: by 10.223.152.213 with HTTP; Wed, 15 Mar 2017 07:53:16 -0700 (PDT) X-Originating-IP: [73.9.224.155] In-Reply-To: References: Date: Wed, 15 Mar 2017 09:53:16 -0500 X-Google-Sender-Auth: roj7yLReAZ2s1_Q2-iXMy6jm9Ac Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Unexpected results from constant folding From: pollita@php.net (Sara Golemon) On Wed, Mar 15, 2017 at 5:36 AM, Nikita Popov wrote: > Yes, this should behave as C. See also https://bugs.php.net/bug.php?id=69676 > for an existing bug report on the topic. > Given that bug is assigned to you, I'll just leave it in your hands then? > I think in 7.1 it might be even fairly simple so fix this: IIRC we now store > the defining CE on inherited constants, so we should know the scope to > resolve against. > Even in 7.0 you could rewrite unresolved self:: references to the current classname.Not as clean when it comes to producing error messages, but certainly a quick and easy fix for the case where the userspace code isn't broken. I had initially been thinking multi-pass, but there are some pretty easy edge cases to fall into there... -Sara