Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115304 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 72399 invoked from network); 5 Jul 2021 14:51:45 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 5 Jul 2021 14:51:45 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 19BF61804C8 for ; Mon, 5 Jul 2021 08:13:16 -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,NICE_REPLY_A, 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-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (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 ; Mon, 5 Jul 2021 08:13:15 -0700 (PDT) Received: by mail-wr1-f52.google.com with SMTP id u8so22461809wrq.8 for ; Mon, 05 Jul 2021 08:13:15 -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=P4yaobmmiDWlsZS+DGFxiDgw+9Pu3MKluHPBiyJnmBw=; b=lcGPuEdIJwdCmNvV+i4b2H3E3H2zIF30d4vQC3Z5KS7AuyFCRot++5Pa5dPYIqd4bM nqAgsy4bvcQKCGetYzgw2p4IbVYBzJ89CFttAAYD/KNQrsMVLUZzpeqtM9AxGTeCisah mg8wR1EJIbKQgcf4/5avMsCMaotjfMODq0rrzA16E3F7UYOUp7Ti9Q1HIcEa+Ik0VfW1 5yoiUBk0exJgv7NeNy83j8+B+yz0Z63EM65uw3l9PPxWUzJ9l1ar5LwnoL30wrZAhSsV 55ds7J3IBYgzTRO/3nFrybuNobs1GzZHtPaatRD+DA/2VP7fgbKyjT6ZRVMzKSgFDt8d CbXw== 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=P4yaobmmiDWlsZS+DGFxiDgw+9Pu3MKluHPBiyJnmBw=; b=bvLf4OqgDwRRMOiul67VCy96n+mPt3MQBFphOr6gSz6NIhzEfVB31TSGl+ry0+c+em i9z6NTtufCDnjbIHr3KpHR069uO8XxERLB4uV18HfjMSUmUO/gAyaXOSuGDVg9ovJhc7 jWeuR2W3lBbWHAtUBniXTW1iN/Jh1Bm4UpwU1a4xkVLoihuPvK4mNpPlLlnhrC6PFRoY wI2Ejl3swZQyS8lX/t7mvcDQGYWYNFKfRJLWV9Bj8ckwx7FIGARwVN02vlV/YzCbu7g2 IAG/UZVsNKJMjlWEKgvzdJ0YktEdCa1Nh+K8Z9dezO7UpRk2GVdRS9sOj8Yt9e6A/pZ4 5cjw== X-Gm-Message-State: AOAM530e88uHWuUFQutzr0qOYCeFvazjnOkTZiQQY0/VLoKSbYCidXX8 AT7ZgDLw7Nyi/kf8hAvX/X4pfAsqMjY= X-Google-Smtp-Source: ABdhPJzOqfKY5KMG3a3FrR0BnOxhZQXlWys14i6jpFgOGl57OLpHBMwn6REkwJIFojnVbG9SBNVNMw== X-Received: by 2002:adf:fb8c:: with SMTP id a12mr16647214wrr.406.1625497994559; Mon, 05 Jul 2021 08:13:14 -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 s7sm13721888wrp.97.2021.07.05.08.13.13 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Jul 2021 08:13:14 -0700 (PDT) To: internals@lists.php.net References: Message-ID: <983059d1-3abc-feed-8ba4-bfe4c62ca05a@gmail.com> Date: Mon, 5 Jul 2021 16:13:12 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Subject: Re: [PHP-DEV] [VOTE] First-class callable syntax From: rowan.collins@gmail.com (Rowan Tommins) On 05/07/2021 15:35, Nikita Popov wrote: > The actual echo syntax is echo "Foo". PHP allows you to write echo("Foo") > in the same way it allows you to write echo((((("Foo"))))). Don't do it :) Indeed. Note that this is valid: echo "hello", " ", "world"; But this is not: echo("hello", " ", "world"); I have in the past had a bug make it into production because the parentheses around a call to "include" were mis-placed because of this incorrect belief that it is "function-like": if ( include('some_file.php') && bar() ) Is equivalent to this (will always run bar(), then attempt to include either (string)true or (string)false): if ( include ('some_file.php' && bar()) ) When what was intended was this: if ( (include 'some_file.php') && bar() ) Regards, -- Rowan Tommins [IMSoP]