Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121057 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 54639 invoked from network); 13 Sep 2023 19:44:38 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 13 Sep 2023 19:44:38 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 943A11804BC for ; Wed, 13 Sep 2023 12:44:36 -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,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS24940 176.9.0.0/16 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 13 Sep 2023 12:44:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1694634274; bh=8dLUZJMKX/x8JPj8GRzzyEMy2sMsJReqQjx2zWxIZuk=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=TFSNeJOmpA+4UDBkUkxAHkoXun3nvZHFaBINHRN/+5Nc3FxAJ4OABozPRUrOSgSVI 1u5BIzDKeeukpZZvBNXNghhC0OfQ9u+YRkW8yMgMbYuH1ODxqQQRTW3VdxvVRKwdgD M9twvUCpAakPQOjuZj/r81R42QGFSlL6lJSddC2zY6nbhfUbpNsenmsvZo9AKf99ym 3mHJynNwKf+PJb/rcyQs8sWG6zdqWVwWNVapcgjJjw1f7LD5b6/bpE569H0X20S3Oq Yc4jvc6g03f88NDgkJQOb1y5t8berrbcm9T48vfMAaCVFzYW6x56M8BZsD09+4C7LY fyU3PNkWoR9CA== Message-ID: <64542532-150b-df63-0c2f-3382f99fe0f4@bastelstu.be> Date: Wed, 13 Sep 2023 21:44:33 +0200 MIME-Version: 1.0 Content-Language: en-US To: Ben Ramsey , internals@lists.php.net References: <01e3ff17-5088-0431-6014-82ef4e4789b2@bastelstu.be> <48699eff-c0d1-43de-b68e-2327fa601528@gmail.com> In-Reply-To: <48699eff-c0d1-43de-b68e-2327fa601528@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Casing of acronyms in class and method names From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=c3=bcsterhus?=) Hi On 9/11/23 01:57, Ben Ramsey wrote: > Since class names in PHP aren't case-sensitive, there should be no BC > concerns for changing existing classes to fit this new casing (for > Reflection, debug, and documentation purposes). That is, if we wanted to > also update all existing class names in PHP that contain acronyms (e.g., > DOMDocument -> DomDocument, SimpleXMLElement -> SimpleXmlElement, etc.). > Userland string comparisons against the classname would break. In the simplest case the following: if (get_class($someObject) === 'DOMDocument') { // do something } It most certainly isn't *great* code, but I don't find it completely unreasonable. Especially if the code dates back from before `::class` was added. Best regards Tim Düsterhus