Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126336 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 4FA711A00BC for ; Fri, 7 Feb 2025 15:42:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1738942808; bh=2Muy9HOCDjdqbiRCRMAJhANJuO7fTBzMv8XOoP3Wtd8=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=C6LpMTlT8s7b8KSGOsH/OQ9Rr9iJKG5aISOsT0yLQIvcifVO5uKFL4z/MtzG/UMpm nY22COaZAqYzGS5QoDmUNKjYsthAVP0FBY9LkZnZfCcniWedn5NIOhFBXflDS4qLXX TFeFAMQ+CSXxvxZ6/t8ych9tlQ/u1z84jACPs/SFo0kpzCqbJzi2c/+e1sjasoOPEm oDrwJ5lHi3msVC/ttSCQigzCc1ZKaRxJUXNl6Rp65zbr6/kbvzN1etBZQJLL6wDD9l TdrtlnXIme8B8TknhyvbnxxR8ffuHw5b0DRwa+EuIGFYvv6tnFYx1Zn6hWfltVJ9Ms Hx2+nGMMEGN1w== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 21A9318007D for ; Fri, 7 Feb 2025 15:40:07 +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=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,HTML_MESSAGE, RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from fout-b5-smtp.messagingengine.com (fout-b5-smtp.messagingengine.com [202.12.124.148]) (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 ; Fri, 7 Feb 2025 15:40:06 +0000 (UTC) Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfout.stl.internal (Postfix) with ESMTP id 6CB361140162; Fri, 7 Feb 2025 10:42:50 -0500 (EST) Received: from phl-imap-09 ([10.202.2.99]) by phl-compute-01.internal (MEProxy); Fri, 07 Feb 2025 10:42:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bottled.codes; h=cc:cc: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=fm1; t=1738942970; x= 1739029370; bh=2Muy9HOCDjdqbiRCRMAJhANJuO7fTBzMv8XOoP3Wtd8=; b=p X2yyk2wV8MjobrIlV/R0xbzYAlBxuKvc9N63CeptJTmYaWHIKaCBZGwJkCneWzeD 9PR32Uc4EoOh3KZU7L0zrif1TptjUOS/R7WGVp7+7yWSuOD0j0tYmOyUjYZFT167 04tXhBvcjbVcwHKXKjXyoE62CSytBOszH5nohvO5ZnX/MwHPdpVuISWO6srYnsUT DdwNe9Kx65C5UEjaR/jSubqdA7upQb6ha5zSPS9UTz6Ukf9ovm6hmAvMnCXCkFvo IJ+agyE9Je7zoDGlZanOWt0Zy5JSmufxi55NgLGA+lCGsA7cVV6lwRFTqoJynNSV 19PDE9PhyO+Min4Gt7v7A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1738942970; x=1739029370; bh=2Muy9HOCDjdqbiRCRMAJhANJuO7fTBzMv8X OoP3Wtd8=; b=CI35tQY+9w3tEnkSKeH8x1TOT+eEmJwzZABtWcj4H/B295dargO sZ+0VMyZ3DL+sa5JqYww+pkXPBW9HDtb8ltmxykq7OVkhfzBgylqokxqJ4Ketgc9 HMo7wDjJCLFJY6AOlcYG4XPgOu7NZ+WBOV0v5xZ+IOUFJNyiEinkC3HuhASVT4mb WjfV2ex5cP6IxMghirjymptvhIMta7tANcDM+ctFWnqXJUuLKmGc0uEzQhYrfXl0 uGKxij0FsdgROZ1VRe0IoPnEGQfn/X9ymQ0g/JnIuF/ZobOaf5Nnqmw+NTt8YB0R 9grSbUkuPIQC4ND35lTOzQmRtofUOGp/izw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvleeijecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhepofggff fhvfevkfgjfhfutgesrgdtreerredtjeenucfhrhhomhepfdftohgsucfnrghnuggvrhhs fdcuoehrohgssegsohhtthhlvggurdgtohguvghsqeenucggtffrrghtthgvrhhnpeeiue ethedvvdefjefhgfeiheelheehtdfhfeekjefflefgvedvkeduteejjedttdenucevlhhu shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehrohgssegsohhtth hlvggurdgtohguvghspdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdp rhgtphhtthhopehtihhmsegsrghsthgvlhhsthhurdgsvgdprhgtphhtthhopehinhhtvg hrnhgrlhhssehlihhsthhsrdhphhhprdhnvght X-ME-Proxy: Feedback-ID: ifab94697:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id C6E0178006A; Fri, 7 Feb 2025 10:42:49 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Date: Fri, 07 Feb 2025 16:42:29 +0100 To: =?UTF-8?Q?Tim_D=C3=BCsterhus?= Cc: internals@lists.php.net Message-ID: <4f6d57ed-5edc-4031-9ad4-a0df08091cd6@app.fastmail.com> In-Reply-To: <4bad8c629e2402b94a125e54da972586@bastelstu.be> References: <4bad8c629e2402b94a125e54da972586@bastelstu.be> Subject: Re: [PHP-DEV] Short class syntax and inner classes Content-Type: multipart/alternative; boundary=e983a09208844966b7b9124408eb6e9a From: rob@bottled.codes ("Rob Landers") --e983a09208844966b7b9124408eb6e9a Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Fri, Feb 7, 2025, at 16:05, Tim D=C3=BCsterhus wrote: > Hi >=20 > Am 2025-02-07 15:23, schrieb Rob Landers: > > Instantiation is done by static access: new Outer::Inner(1), which i= s=20 > > currently a syntax error. >=20 > How would I access static members on an inner class without having=20 > ambiguity? `Outer::Inner::Const` already is valid syntax. I can actually answer this one. The name of an inner class must not conf= lict with either a const or a method in the outer class because this is = also currently valid syntax `new (Outer::Inner::Const)` where it resolve= s to a string of an existing class or `new (Outer::Inner::Method())` whe= re it returns a string to an existing class. =E2=80=94 Rob --e983a09208844966b7b9124408eb6e9a Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
On Fri, Feb 7, = 2025, at 16:05, Tim D=C3=BCsterhus wrote:
Hi

Am 2025-0= 2-07 15:23, schrieb Rob Landers:
> Instantiation is don= e by static access: new Outer::Inner(1), which is 
&g= t; currently a syntax error.

How would I ac= cess static members on an inner class without having 
ambiguity? `Outer::Inner::Const` already is valid syntax.

I can actually answer this one. The name of= an inner class must not conflict with either a const or a method in the= outer class because this is also currently valid syntax `new (Outer::In= ner::Const)` where it resolves to a string of an existing class or `new = (Outer::Inner::Method())` where it returns a string to an existing class= .

=E2=80=94 Rob
--e983a09208844966b7b9124408eb6e9a--