Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92239 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58894 invoked from network); 13 Apr 2016 03:08:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Apr 2016 03:08:11 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@golemon.com; spf=softfail; sender-id=softfail Authentication-Results: pb1.pair.com header.from=php@golemon.com; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain golemon.com does not designate 209.85.215.48 as permitted sender) X-PHP-List-Original-Sender: php@golemon.com X-Host-Fingerprint: 209.85.215.48 mail-lf0-f48.google.com Received: from [209.85.215.48] ([209.85.215.48:32948] helo=mail-lf0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 35/D2-33659-918BD075 for ; Tue, 12 Apr 2016 23:08:10 -0400 Received: by mail-lf0-f48.google.com with SMTP id e190so51495406lfe.0 for ; Tue, 12 Apr 2016 20:08:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=golemon-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:date:message-id:subject:from:to; bh=1KlMybCBH0H6Xzflry8kOGwt7Zl8rWfAFa3J0S9Ge4g=; b=cNwOAGSuDKWb1pQyYHui/7Wy6jL9GFkHJam3EAJlY7u9Dc1Cb4Gqor3+efGwlO/9ze Fm92raMLQyZPlJKyGlgPtg0RV/zGcnvfr8fvsOJaCz++YIiYh7mjNXMB26iKRkxXoBJu 9QqWJ8cc9+LU1fdOCJFcBiaAuJF+nROKcMfdJ6RPmsHYZE87FinOpOFKhMTWYnYfV6Nt gui4tx3H3y08reCbyq5bcaTnDbzPD3MwN0sbA0QVQFPWatI9mtMcaGDC5EnL5w1rY2OJ 1PR0gc9eaHm3wQQ4V42mLxHgGZZHDLAZXd1qK+RoNpVh1XsB+gbnFrCH3+Au1O9Cc4s7 1L/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:date:message-id:subject:from :to; bh=1KlMybCBH0H6Xzflry8kOGwt7Zl8rWfAFa3J0S9Ge4g=; b=EyLpCROuOPPqG3Ncs3MygIapvMN2cC/YvG22FgiRJYUoA4lH+L4XCsoLzO5PJeGqWB NdNhjGYFWgvqbQ7Ap7Tvl93of8KXO21K9ogqWhGDKgBPzjqUjOSoTXg0imZaw44wrIaY yL1nSqcai+CKHOvTVVytK6QX4VUhSn/lqWvtwUlpdi5/Yt/ItzwONzisjbwJ5B/eJjwU LhamPz4SswVk3M+j55QLMXNemDdHb8K3ln/dap+cYlgXK+C1D8qVB0JCMvSDhYhYFfX1 E+Ved2ledl4hGA0x/AkhUihIIWOtkK1jrHeFzswk2E6ZKh3E3k4C27Wjdf8VA/u/caIH Q4rg== X-Gm-Message-State: AOPr4FUlpdigtwEcSVVi1etM3F8ltZqFN4VBn1u2PonQFz0rGvhv9hQdVW4pBztWMBSQI7u3ymGCFqwz6qfcoQ== MIME-Version: 1.0 X-Received: by 10.25.136.67 with SMTP id k64mr2556279lfd.60.1460516886277; Tue, 12 Apr 2016 20:08:06 -0700 (PDT) Sender: php@golemon.com Received: by 10.112.18.75 with HTTP; Tue, 12 Apr 2016 20:08:06 -0700 (PDT) X-Originating-IP: [107.198.91.68] Date: Tue, 12 Apr 2016 20:08:06 -0700 X-Google-Sender-Auth: Rtb1Any_WoabzdrBWYd2Gm6OQPU Message-ID: To: PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Interpolation using ${} syntax with spaces inside the braces From: pollita@php.net (Sara Golemon) I'm trying to decide just whether or not https://bugs.php.net/bug.php?id=71927 is "working as intended" as well as what the expected behavior in this situation /should/ be. https://3v4l.org/HfU1g indicates that at the very least HHVM and PHP disagree on the correct output, and testing the same sort of expression in bash says that it's not having any of it; "invalid substitution" warnings abound. The PHP behavior is just kinda weird. "${ great}" does constant interpolation yielding "$my" which in turn becomes variable interpolation and we find up with "my value". I'm actually doubtful that PHP pulls off this juggling *by accident*, which is why I'm posting about it before even going to the extent of proposing an RFC. Does anyone have historical context on this and can explain the current behavior as "working as intended"? -Sara