Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129173 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 lists.php.net (Postfix) with ESMTPS id BC92E1ADBC9 for ; Sun, 9 Nov 2025 17:55:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1762710935; bh=glyO2COMNZ/5dVrTGRnuMhUlD984+Rwp7V1ziapm9lo=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=f9hRqGg023aK9Tu6PrRn655Csyi0g+PHIZdNhuCjnVAIQsjCNahkLOzLs+BY5+B2S 1nl3eUQbZ2QGnzhy8azu+MSsdPZsvxOxkmDROBZtJvzDyyrjDON7IxcTLOMfPwu+01 X0ehBwwvxicHvtZeKvbXhc7Npi3/UHY3/yNC4SSTpkxX5FOKPKWv8Z3+lWA0+5Ssve jT5qMr76LD7mCBGhunxXslsStZ6AhKDN15n8GodNkHuN25kEjZEHcUSzrdSsV97TFE iSxupInv+1Yk0jTi40sxqFjr8c1o6NxQEocmP2CVw0tzEmn+wxDBCv1fE3gBWB0BTs xDlByunjgt1pQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 9B14A1801E4 for ; Sun, 9 Nov 2025 17:55:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_40,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.1 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 ; Sun, 9 Nov 2025 17:55:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1762710924; bh=aS6Bj/wusMCHCAiqcvByxiq5Q0Z5klPRiIhwCgc7S0M=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=M8+M724JGenHPEkpcFhirWv1DUM0+LPXLLQy6cyg2v68xf4gBjOk1FRL2x0IdW2wN C97dZMRxGO/rJX25CeU+6l2f9YoVJe7bbyz/6Zxr07UwDaOwqS3wCzNtCq0IM+oxVP YEKDBuq1Gnti0RNNE4obTxn5kqYmT0Vsnj2QicfqHwWfVcowyDRmdjXpozZ16jl5sr ldmfgSHLKIosAt8I3y/ojkfiMyYUeXd4yNsXR6MXgEMDP67YhurdpV56kDWqsXfb7B +tjj5SQ9juHoMf3jcAepaFRrAkCkZ0IlUj00xtZFE88rKEnIt70D67SkfBjtJClG8G 83zbXyyABQFzw== Message-ID: Date: Sun, 9 Nov 2025 18:55:23 +0100 Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Subject: Re: [PHP-DEV] RFC: Namespace-Scoped Visibility for Methods and Properties To: Rob Landers , Faizan Akram Dar Cc: PHP internals 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 11/8/25 21:09, Rob Landers wrote: > Please remember to bottom post! And please also remember to cut the quotes to the relevant part instead of just full quoting. > The reason I chose private(namespace) rather than a new keyword is that the semantics are fundamentally a widened form of private. This is not accurate. As Alexandru also noted, it rather is an alternative to `protected`. As I believe I had also noted for the nested classes RFC, `private` is special in that it does affect any other class at all. For all intents and purposes it is not visible to the outside and new private symbols can be introduced without taking care of possible parent or child classes. From what I understand this is different for namespace-visibility as suggested in the RFC. Since the method is externally visible, changes to the signature affect both external callers and child classes, which need to maintain a compatible signature. In fact it has a rather odd effect on child classes in a different namespace in that some methods are just unavailable to them. It is probably necessarily to restrict inheriting from classes with namespace-restricted symbols to classes from the same namespace (i.e. making the class itself namespace-final so to say). Best regards Tim Düsterhus