Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125117 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 42FA11A00BD for ; Fri, 23 Aug 2024 10:14:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1724408199; bh=o2SwUpWS85ayutzQ1soptAypDAD1NL9/ufkVPWc2z0k=; h=From:Subject:Date:References:To:In-Reply-To:From; b=nRL4oTv4HqM4uE/nTPzBchuEiRW4hM2QA6MDKVFdARnO1qZXvGDcRUrIewCQRrzRT mRyHvu0JboRS+wQ6SWFkgHRVsdiA5rwU41qf4JPAB0vkn5rGJ8hmiojggserYTsA8M Y/rGeuHJwaTbXKayY//i4TANlAgtkMxFc09DsjMHO1ODMxYv4bi86y3RF8WMYY5vtN iYWraPsozYMrvIHE/HCHljFt4WbEqmoJqITkDxscJhU5UVOHWcC0ZlpcgJ+iyzp7Jh E5n92b0J4en2oWmdwLiCY0dzzK9UO3899HgbjjlFOHOFgnJlOKr/bEJiRhfQyqCg+b kTCpbTl0O2L9w== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 85E1A18007C for ; Fri, 23 Aug 2024 10:16:38 +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.6 required=5.0 tests=BAYES_50,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 mail.gna.ch (mail.gna.ch [212.45.196.109]) (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, 23 Aug 2024 10:16:37 +0000 (UTC) Received: from smtpclient.apple (unknown [IPv6:2a02:1210:2e0f:4100:cd92:f947:228b:7477]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by darkcity.gna.ch (Postfix) with ESMTPSA id 5CCAB3A1189 for ; Fri, 23 Aug 2024 12:14:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cschneid.com; s=default; t=1724408085; bh=o2SwUpWS85ayutzQ1soptAypDAD1NL9/ufkVPWc2z0k=; h=From:Subject:Date:References:To:In-Reply-To; b=eKoSoLpzsFdLSRPDs1x3hGtXrFkIgZ46gogi1RIkrUT6HzyNZ7YnNeMHcRMQshyRb OHWPS0t7ST3RCeI70VoDlmUeeDTf2p53lc4j9jqQU6QL3ISSdYdfBL2BEQFkST8erj g1n8rpqji9I+opzNj4VsWPQWkS9EE5COeutPKsNE= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: [PHP-DEV] [Concept] Flip relative function lookup order (global, then local) Date: Fri, 23 Aug 2024 12:14:28 +0200 References: <846D7756-712B-4A7C-9FC6-DB9F858836B8@rwec.co.uk> <880ffc27dc9b421407a670c75d5f5ba756870396.camel@ageofdream.com> <790534cd-e158-4712-878c-642dfd0e2bad@app.fastmail.com> To: PHP internals In-Reply-To: Message-ID: <63F3CFAA-0D9A-4323-A1A4-0E3544281ECE@cschneid.com> X-Mailer: Apple Mail (2.3776.700.51) From: cschneid@cschneid.com (Christian Schneider) Am 23.08.2024 um 11:34 schrieb Nick Lockheart : > I think we are all trying to achieve the same thing here. I'm not sure who "we" and what "same thing" here exactly is. I recall the following arguments for changing the current situation = about function look ups: - Performance - Function autoloading - Consistency Did I miss something big? First of all I don't think the performance argument holds enough weight = as I'm very doubtful this impacts performance of a real world = application in a significant way. And for people *really* hitting this = problem there is a solution already. Secondly I am a bit confused about the whole function autoloading = discussion: There is already a good-enough mechanism (putting them as = static functions inside a tool class). I just don't consider the hoops = we have to jump through to get a more "pure" or fine-grained solution = for a special problem not worth it. As for the "don't use classes for = static functions" I've yet to see a good argument apart from personal = preference. As far as consistency goes I've yet to encounter someone being confused = about function resolution. But then again I'm not reaching namespaces = for PHP classes. While modern tooling possibly can adapt source code to the new style = efficiently I have to maintain too many installations of PHP projects on = various hosters to looking forward to that. And the argument that "you = can just stay on an old PHP version" is just not a feasible solution = either.. Maybe we should take a step back and reevaluate the pros and cons.=20 - Chris