Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123312 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 623351A009C for ; Sat, 11 May 2024 16:14:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1715444110; bh=xrH5OFSYO9XaAfGKTkwamvEzIIKiez8adDGplYjuUWw=; h=Date:From:To:Subject:In-Reply-To:References:From; b=Ri/2fBD9lc6tL8EtpOQU7kpSbKTQYtdzfFXf81B+EVv8J9bea9m2T/FFFDwkau1QQ tzjP7nYL7oIQ0EhxAId+HAMXD6aer42p82bodyK1s/A9v8RIBxBunHWvGY5JeoKeVI Br7xL149ycuYxj0MGshXmdgh/VqVzf3hshqp5MPl/NudZw3QJ02SUszilee0GHyB36 3FjMCl9exOeum0OAzeJfstnSXoo7kPmfbAAgTaCy2qIiychQN7fJ2ikWZnNfKXRaSQ wTC8FRT4uConSHeMqIytDcMbtN94454dlErsJHkh4jKXSASHwMxx7y2+MUjwj45mQy UdgIlwCC5teBA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 09B59180004 for ; Sat, 11 May 2024 16:15:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from fhigh4-smtp.messagingengine.com (fhigh4-smtp.messagingengine.com [103.168.172.155]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 11 May 2024 16:15:08 +0000 (UTC) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 9EF6C114010A for ; Sat, 11 May 2024 12:14:17 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sat, 11 May 2024 12:14:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rwec.co.uk; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1715444057; x=1715530457; bh=xrH5OFSYO9XaAfGKTkwamvEzIIKiez8adDGplYjuUWw=; b= itj02QpYmRLP2L0GfwZpTaKilVrtALpT9kzb7HXxvHS4uCy1nv+KMRrcSEaosqUF t/6NoAu/aoEzN9VBKpKPl2tezVbk5HUVyAQXCJE7uJzOBId7jigpRZWRbQQVeGyo 9ozY94oOWLoFFxyV0G7qts/rnkmOMMtj2/nI84Do+3+bZ5jVTLdeLKW/cuqjhip0 QJTf19GpMYXLrjUp1Ur4+iWg8Du6BYkW9sjJfDgatSuxt7A1/it8q7dxxdLhsKKn bvMX3Jl/hrjawsikNsCfBIkwFACnWbnEdP5CydOn7mCaoRItGKfauzALied5bVmU INwbNOABhAK6vtw4mKoSIA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1715444057; x= 1715530457; bh=xrH5OFSYO9XaAfGKTkwamvEzIIKiez8adDGplYjuUWw=; b=P wKshg86z99NBkRQK7ZQceDETto2nynUztF5rlDJ2cfmeu/Q2qZYgPnLWFLWTLP9Y 0PsP69GJAeiVrId+LgXDznL/VIMdRUaLzU1b33n7s5bFFEXtVkhvvwGM3MZNEytS r8C8FwneKQnGdSDKJDkjwGLqByzY2mnt539WdtNW/7LP25nd2nmmIDrYfFley3U0 5WicVFdjN8kYBact9VHrxCjvqe+RCbYRd98v+KO8v1x+wpdnVobyBbkbwSyrnrSW 6Op9giRK6wkeX2D1JnnpivN6KRQIrJrbW/VunDkINKT2qmrkCUxTsZ99kgpIzyof dwh2ypsIM1x2WDuBphATA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdegtddgleejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvufgfjghfkfggtgfgsehtqh hmtddtreejnecuhfhrohhmpedftfhofigrnhcuvfhomhhmihhnshculgfkoffuohfrngdf uceoihhmshhophdrphhhphesrhifvggtrdgtohdruhhkqeenucggtffrrghtthgvrhhnpe elvdeuhedtheduudelfefhgfejhfffvdeljeefgfeuiefgiefgvdehhfefuedvvdenucff ohhmrghinhepphhhphdrnhgvthenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpehimhhsohhprdhphhhpsehrfigvtgdrtghordhukh X-ME-Proxy: Feedback-ID: id5114917:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sat, 11 May 2024 12:14:16 -0400 (EDT) Date: Sat, 11 May 2024 17:14:12 +0100 To: internals@lists.php.net Subject: =?US-ASCII?Q?Re=3A_=5BPHP-DEV=5D_=5BRFC=5D_Transform_exit=28=29_from_a?= =?US-ASCII?Q?_language_construct_into_a_standard_function?= User-Agent: K-9 Mail for Android In-Reply-To: References: <0a30b095-149d-cb45-3f54-3d904774c139@php.net> Message-ID: <9F1D0418-45A0-4710-8D59-A2112947719B@rwec.co.uk> Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: imsop.php@rwec.co.uk ("Rowan Tommins [IMSoP]") On 11 May 2024 15:43:19 BST, "Gina P=2E Banyard" wro= te: >print, echo, include(_once) and require(_once) do not mandate their "argu= ment" to be passed within parenthethis, so making them functions does not s= implify the lexer/parser nor removes them as keywords=2E It's actually a much stronger difference than that: parentheses are not pa= rsed as surrounding the argument lists for those keywords at all=2E A while ago, I added notes to the manual pages of each showing how this ca= n lead to misleading code, e=2Eg=2E one of the examples on https://www=2Eph= p=2Enet/print is this:=20 print(1 + 2) * 3; // outputs "9"; the parentheses cause 1+2 to be evaluated first, then 3*3 // the print statement sees the whole expression as one argument echo has further peculiarities, because it takes an unparenthesised list o= f arguments, and can't be used in an expression=2E While it would probably have been better if those had been parsed like fun= ctions to begin with, changing them now would not just be pointless, it wou= ld be actively dangerous, changing the behaviour of existing code=2E=20 Regards, Rowan Tommins [IMSoP]