Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111932 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 86388 invoked from network); 24 Sep 2020 20:27:41 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 24 Sep 2020 20:27:41 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D44FD18053F for ; Thu, 24 Sep 2020 12:38:05 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 24 Sep 2020 12:38:05 -0700 (PDT) Received: by mail-wr1-f45.google.com with SMTP id k15so473373wrn.10 for ; Thu, 24 Sep 2020 12:38:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=mRMhmOzgtBZBVyUHuu0lU6XTitMUlDxWp11HR3NKbjA=; b=TdBA1+0HTAlERS5fry+eKXiQdjX5Oyan1l19qtHL/+OW3lZnMjxlLAsSBeBBX1t54D 2tdyPmoQKR8+o4RbswcC2r9DufkEyGw9x9YrbEu9yPXX8i0IT/yMl6qFUBpFXWxVDkrV J6DiowJTrN1sK5hkfxEL7mqciIZMkEstJE0WOsP8hc6K0uONFqYvETS4XwhFpO9WIyfR RuhFOie6YJ74oZZxIEsbr/M88S8eX52ddQSFKHDxQNrf3B4Xo9dC18mw0pG9APjVjgiP hOOoeVp4ojNVsWIrQofITiyvovOPk7fp2r6obnERY6r8hE0H9s9Drasb4OA9Ei31xCt3 M7xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=mRMhmOzgtBZBVyUHuu0lU6XTitMUlDxWp11HR3NKbjA=; b=dAb+yC4SyuiJoeJWWu21LH6K0QbR3X1MDoSbBeoQOm1W6+kg3JCjF+u2o/7pDVgmzo 0zjoVw40pJ4Phx1i3qtbOXyxOI5VM7vJLXyJk3nLrZCD5Yl3KPhKnVpdDRY0yCl/vI/v Fyp3uQp5i9IBMcgP4A3hbOyZPMVMelegBrmE8FxDWeInp//qGWvkyvq3iU2u0q6a7cjN xHdNemPeLrxOhdfMIVYMqSsUQze7wnlyZmibsGMFBjikbwokeZzIztjwokSSoBUacSxG XbMC82vFs6ZmDTVTDEk5k5WP7lEmkraNEk/kHDeaCyB9rwEf75X4kOew5TIJYX7Zckho bBrw== X-Gm-Message-State: AOAM530eFqxEAB4ZdTL6IKlR9cqwiV+miSG4lUFdIXYRIFBj9gFMnfBo 4P5QBm0NGyaBrs919TQqNmpHMPr1KTU= X-Google-Smtp-Source: ABdhPJxqsjoO9UrLb27Zr2r5se2M0uia9qq6sWn5ke7JqQtZbDSB4lLoIpMCXIDAzHtaCahp/FBV6g== X-Received: by 2002:adf:dcc7:: with SMTP id x7mr496976wrm.203.1600976281730; Thu, 24 Sep 2020 12:38:01 -0700 (PDT) Received: from [192.168.0.22] (cpc104104-brig22-2-0-cust548.3-3.cable.virginm.net. [82.10.58.37]) by smtp.googlemail.com with ESMTPSA id b8sm345237wmb.4.2020.09.24.12.38.00 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 24 Sep 2020 12:38:00 -0700 (PDT) To: internals@lists.php.net References: Message-ID: Date: Thu, 24 Sep 2020 20:38:01 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB Subject: Re: [PHP-DEV] Interpolation From: rowan.collins@gmail.com (Rowan Tommins) On 24/09/2020 19:59, qu3s710n wrote: > Wouldn't you like to have adequate interpolation in php? > > ``` > $index = 12345; > const SOMETHING = 333; > > function number() { > return 888; > } > echo "this is a ${{ number() + 123 * $index + SOMETHING }} string"; > ``` > Personally, I find the interpolation we have "adequate", but you're not alone in thinking that a more powerful feature would be nice. Have a look at this recent thread for some of the possibilities and problems: https://externals.io/message/111519 As a general note, though, it's best to broach new topics with a bit more thought than this - being able to say "I've looked into improving X, and it seems possible that it could work like Y, with possible problem Z; should I pursue the idea?" is going to get a more favourable reaction than just "wouldn't you like X?". Regards, -- Rowan Tommins (né Collins) [IMSoP]