Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129564 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 26C1A1A00BC for ; Fri, 5 Dec 2025 15:37:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1764949031; bh=TfOm1yAnIBZ9qdbx6VlOTwcY/Jq4nTBhtQps0pZKvTc=; h=Date:From:To:In-Reply-To:References:Subject:From; b=Lc4bXBnaQ+1nWpm67mr2Dw3nkJ2eG8jTz5TstNF9mfnT5SIy/dWkC4+5IjqOuVBVt ayiZTqaTMem/4wd8Kfb+sHjTU1fDiUWnXog8geyxHaHbtprVtleyznFqWHh/ExqcAC KMiRzgttN+QIyd3jbhCe37CZGBaSY58Z6gBvBv4yooEgZZgChxd150btjeXWCNxbOT 4opiUp7vujw4s6YmzuPPvDgtpWbRynIjow4D/k0yB/zNo9NwMlk4L+RWHO4lmDkNs5 jYRNLs2MSh8J7ZPwdKyEoZnGZKHCKciwV7D1NJ4IufcQi5QOHXWoDY0YkUZ3QWH+JO E4bdQN74fzS/Q== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B45D618038D for ; Fri, 5 Dec 2025 15:37:09 +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.9 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from fhigh-a7-smtp.messagingengine.com (fhigh-a7-smtp.messagingengine.com [103.168.172.158]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 5 Dec 2025 15:37:07 +0000 (UTC) Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id 79F5E14001F5 for ; Fri, 5 Dec 2025 10:37:02 -0500 (EST) Received: from phl-imap-01 ([10.202.2.91]) by phl-compute-04.internal (MEProxy); Fri, 05 Dec 2025 10:37:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-transfer-encoding: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=1764949022; x=1765035422; bh=3SIO3XOiIMhAFwYL8mYkX XXSqBfvEFONn/4yKDZz+w8=; b=Yjk0lEcKh6Yglm0eHMFR8rprBnhl1dHIj9yhA hybIQr5aMS2zvLHfRivou67UUJ8ux+w+lIgrxLRRE9f3A9DzBK9MntAIXchEVxCx KQrGGH0tXJgJIZDa+I2U1DwGj3IItwrey3nTeGAmOLko8WJXp74N8BvMWz/wDp7h y8e6UOQyLKwIOaYqkq8SkM5WKXA4hXA0sMLk28gEafDfe0JmaQM0oCJz87ucsDhO mJbXWz64aBiCSrfC59CFu9/iz8ThQ6EcjOl6Hh9AL94MfNgho0H7mRgT3iEX87Z1 Kdj8yiIlDeoh5LFoHoL5Hlv2S6D7ZlaJ/fyaUqJz3U7wgnwYw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding: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=fm1; t=1764949022; x=1765035422; bh=3 SIO3XOiIMhAFwYL8mYkXXXSqBfvEFONn/4yKDZz+w8=; b=YPOGENG/IGahvOKrx rTYkXdiivNzwaNU7lKl4GlqxggTDPhRMZo4WkdbOLcNPHYTvZFc44GFVxqY5kG1X ZbfOIxOh8H3m/NVwxjYatdaPToCSbvlGaLtMxaDLpm/U6o5dvjeSfC/MBrMpQKxH vu38S9c1ciaRq1+7Lw4jkix0pvaMJtrMDQBMH6rWQE7um4DmXO7iZ+BuSkGVNsI7 2tXxBv03iBpEVCNoFgnXv1flZ7vIjYCVnAyQhtb/em1TMtFIk+E//+FRooT5tm7z jT7lEZ58iUytv2uQyIS261DKOuV10tXcQghImeDL7dfQZcyb27ha4vghHWChXL+H k6MCQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdekjeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceurghi lhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurh epofggfffhvffkjghfufgtgfesthejredtredttdenucfhrhhomhepfdfnrghrrhihucfi rghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhmqeenuc ggtffrrghtthgvrhhnpedugedvlefgueegheefjeetffduveeltefhfeegjeffffelgedt tdevkeegkedugfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomhdpnhgspghrtghpthht ohepuddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepihhnthgvrhhnrghlsheslh hishhtshdrphhhphdrnhgvth X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 5EAC818C0066; Fri, 5 Dec 2025 10:37:02 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 X-ThreadId: ABqgc2PdGi0o Date: Fri, 05 Dec 2025 09:36:42 -0600 To: "php internals" Message-ID: <30a916ef-2237-4717-8c43-224f3fc49add@app.fastmail.com> In-Reply-To: References: <3D90E174-23F2-4B90-B881-20A0AD30CF0C@rwec.co.uk> <31ed0152483193e85ca3a9eebc5e6d14@bastelstu.be> <7497bedc-a13e-a627-f733-cb2495249e63@php.net> Subject: Re: [PHP-DEV] [RFC] [Discussion] Stringable Enums Content-Type: text/plain Content-Transfer-Encoding: 7bit From: larry@garfieldtech.com ("Larry Garfield") On Thu, Dec 4, 2025, at 6:32 PM, Bob Weinand wrote: > Hey Larry, > > On 5.12.2025 01:21:43, Larry Garfield wrote: >> I've long argued against allowing __toString() for reasons others have already covered, so I won't bother repeating it. But off hand I don't see why __debugInfo() would cause a problem. I am not sure it's useful before ADTs happen, but I don't think it would cause any harm? > I found to semi-commonly (the ergonomics of querying are bad) add > attributes to enum cases. A __debugInfo() handler could provide > information about all attached metadata. > > > Bob Ah, interesting case. OK, color me unopposed to allowing __debugInfo(), but still opposed to __toString(). --Larry Garfield