Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126607 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 229B91A00BC for ; Thu, 6 Mar 2025 21:00:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1741294694; bh=q1Hf17tLp4Kmqga6ZIMnN07DySlZ2MSk81qj/gd8mDU=; h=Date:Subject:To:References:From:In-Reply-To:From; b=Eb1rDYhF7TNzKcFA6OlrfBoyMKu3Pcm0fF3LbvVvUec/ZSq4hL+ZVgTyBwj1Dpjj1 4lWIUYE4OLZT267BnE5qx28rnx59WuwwImgrF1jb8BZ2L+KU00iuu+2ZbQ4v2b5yaj Mom1/sQ/WkfIdkkj+zuV/TDJK4pfTkwcbsj/A+YepVttA2x8D2Y5MsYO5Md1XwAvvy Fuz6Aj1mQ2FtNTdaxzPXGqt7WHfXJMldPS+eQM0KD6uuU2rOBtH4VsEZf+rgXRApRs 9eoFvYlYm8jndG2/PuZUrCOxrKuBuSJDYbciSPTXwWJ6zzeUyj+S4KHiyH7dkTkiG6 k3XV5BytXx8Zw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 69195180080 for ; Thu, 6 Mar 2025 20:58:13 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (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 ; Thu, 6 Mar 2025 20:58:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1741294846; bh=qDE5mWVb7y6jD6nPDebK1FQrqqXEc5G+5wMgxQcqJks=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=lc6/kNkBn/dwTp2o+dlrAAbs73tMpmG2Utn8ca3fmqBGk7U/g3uJvZXw2qG3aqeJ7 Iq3vngLpl2sWagx99yUiTj3L7qgCHX0KJArH6Or/b65GFJddDNvKdi0z2OwYPrrG/8 X2fmVHWARlTmiA1YLyvWPVqerhktk6+yS5LyDsyucj2raoe1Se6b5/X9ZFhkHydnwB sAhbEPO8zVWZgHpTQIKEgXlBea5tQqod4SM6Zwk0qT2++kouYJ0VuKe0yu05tSw7mN Or2dgNX9789fngZpuEcK0JeoAAW6rdOI0XbJDDDRkYFZ8cjKJrh5p8i9Zlq8URv+Jj wX2r4oqEisksA== Message-ID: <8303823b-a193-411f-bb60-c0221e7f29dc@bastelstu.be> Date: Thu, 6 Mar 2025 22:00:42 +0100 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Subject: Re: [PHP-DEV] RFC: short and inner classes To: Niels Dossche , internals@lists.php.net References: Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi On 3/6/25 20:08, Niels Dossche wrote: > What I'm less in favor of is the implementation choice to expose the inner class as a property/const and using a fetch mode to grab it. > That feels quite weird to me honestly. How did you arrive at this choice? Somewhat relatedly, the RFC does not mention how the choice of `::` as the separator interacts with the following features (i.e. what will the result of each of the statements be): Closure::fromCallable('Outer::Inner::method'); new ReflectionMethod('Outer::Inner::method'); defined('Outer::Inner'); constant('Outer::Inner'); $inner = 'Inner'; Outer::{$inner}; … and any other meta-programming functionality working on class constants or static methods. Also, what will happen for: class P { class Inner { } } class C extends P { const Inner = 'x'; } (and vice versa) Best regards Tim Düsterhus