Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130359 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 ADDF91A00BC for ; Sun, 15 Mar 2026 18:05:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1773597907; bh=/TPVm8u3CyKEmsC7u6BizWg2zzhzVGD1tAytkSWvBjo=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=kNsQTXkHa5X8V5kTQZ+USpbdLOvHbyzWrdmLvYH1vqol1jVihTxzHjM/z9ZGDJDcR KtYV0xw/uU3UKq6tR6Hhfy8XV20OD9bjMcECoj6jamIkqBpe1bC4AxJnPXOgeexn7+ uzNqe2UndCmXFa4Ibt/8gV//s2uKP5/niykCmTvUBvyfXwWi2djp4TtMg8mI/tN+H5 oSoQKYwj0K0iCKtKQB4FrcFvy4w/bYdnicEls05TWnM5uQ87mSLxKSifAHdf7fPQ8V uOxUkqQDdkj7cGkEIjUFkuzM00//zyIBROhbT/MgoCQcHtQb8ACrWsFTk/eXx1aYqY rEUR3XiXkBFFQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D0FBE180339 for ; Sun, 15 Mar 2026 18:05:06 +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=ARC_SIGNED,ARC_VALID,BAYES_40, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS, FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-yw1-f170.google.com (mail-yw1-f170.google.com [209.85.128.170]) (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, 15 Mar 2026 18:05:06 +0000 (UTC) Received: by mail-yw1-f170.google.com with SMTP id 00721157ae682-7987531082aso37317707b3.3 for ; Sun, 15 Mar 2026 11:05:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1773597901; cv=none; d=google.com; s=arc-20240605; b=NN6IUHwwWJyYO6d61NB9EV3Q0+iwk1BzolW2XJnDh3dlNHqgblhp46mjrmlF7SO0CL C8ywO2k7pjJwSog8zAKmREqVBSI14QAEOwUgA8GJPh2ooi/9F+LpxK8DlXq129G5lh6t Gi0WVZ+fcGcV/OhH0dg8sX3xs89dnAi9MalcGgvUjDfKWDAmYy459H5ssWLr1bdwL+t0 41sOhFaAMah/QnyUQQZU09/khfGc1OMrEXPf9Y8jHAmR9XW5/2UAIWZUdpz4gNGTT55g 4JWoSHg5olhQYKlL4FW9YSfI3G/EhLX67YH5CJB+kD/Hs1V8Rea8w2irTsZJqy8D+n0r TSHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=M9Eqjrtg5FWGgv8xi227qcVNuEBnifhVldYHMuOGVWY=; fh=tZaAR+rn5+ccUeA8Ip/o7hxDiWTDpCpb5fFE5/4Kerc=; b=Ciy/ph2MoPrvD9oTeuKfxaA0vLUSGw9yIhKl/igOtQiFrjS7Cs6RbzuHdEe3TeKPg7 5Pdp9KNsJiaGQ0va7TCVmXlunjzXiXbgjGFYnnHdn3qIbaQfCAyFVibitI5uHc8TKOov 0GacTiUVw8zqJElIOfJzKkqBlO7hpETivOA4fQ47lunMOJ43d9VnR5egY2KfBYGbHmbI jxzkY8y0oCN01sorPzSgH0ddzQlen8IRBEmLfeLQZgA3zGxxqmU2w1lRAuBxkIWLgLTk kaKmibG5qGzldmPPLfkF7ANnca+7KPm/7VmsxBVIcQCbh+yv0E9T+Mg80inITA4AAmu2 kocg==; darn=lists.php.net ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773597901; x=1774202701; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=M9Eqjrtg5FWGgv8xi227qcVNuEBnifhVldYHMuOGVWY=; b=Hb07/u0Fr17pb9ZV+chtL6tcxmJVCqbtoqsN0q/K7vuEZu+mssC2JJvXFhnuc3DzA1 FL92ziOD7tYfc4+ElFnVVnYx3nGGi1cJ2dIHaNKTWY6OyBHqVCEVW+1gOKb43dbjKJMV JQuszQkjy0/tZ2slGHwDq6doxxgMqC0SDxOlaY/i58HImfaQ4hg4Gsr59VNEbfPjW1xB 901Vssvx5n95ruiH0+FZs75Az8gsc+BFJQFczAe8zLx2L0HBA2IRuNr0/pJmm0Wdgbsc /Rpp7hCv7Nj+158zwcEalT5oV90LBFiadQxxWjLC4zMQJDxoasn/a5PCi/D/auS8YI8j ofrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773597901; x=1774202701; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=M9Eqjrtg5FWGgv8xi227qcVNuEBnifhVldYHMuOGVWY=; b=JOqPCU2EgO/VhbAQHdyqYg47uXP9qdylmH7Csb5DutQM4VSk/cY5TlfXTEWUNUkTSD yKBbJScPD/Lx68nyYA01JD1Tnk4RerqJl2q5eU6hHmcHclUMb++NmdSxHHq3trlQPwRA VKSFPtBCdgOujnjfShrwrkRFl5xJ8GNb7OOTRRO2X6BCRa2wFHG0sOHfNe4tYT6b6zt3 FqW2NVjq//3Mw5XcBJZWoMDa7VTtqnwp54gnCD0PAABHL/zeh4lPUYnmzEzkwM81iXvF s18Ys9a3mXYjP3HqFUHTbh4h1wuj+OeMNxbqvRRnYQ0xCzYG44bI5YASr8uhaCx/JgBb veXQ== X-Gm-Message-State: AOJu0YzJm7hBEAekPs4J7hjW0DgyLEZzxdhV2PDpVTTeWK/wXYj3+OcR tv3VJPGTELgRmGSaSwJdN303Wmkc6mPU0+U3cvQ3AAuSPHdTvICG5l4RbaFgfB/OKSnc/OBd+8z eeJR0quJ3TE+hiHy0k91Vu6S+DO6EbKvt8CsA X-Gm-Gg: ATEYQzx88/anj+MKrH3dSRL/ddO7tdKBT+UmarHSKV3pc4o2Nd7aTKWiUS4UxQIBIKV /jrsdnZg2CKg+PYiXNdit0RfxGCzekwohJZ1YGKjqGI6havG9vsqTjFj3WBteztxD9Stldm+f3d 7AUN+7SXYxMtMXZhn5Qj8h+nMezpl07/FQsvdABwmHCenoaAAQwJyWfKkskN7CUS4NpeskmkM8E iyNLVV1c9P7clqwZLWS8vsHp/r5YgPXHh1AbyPVIqEVILQ7q/CvbKIAV5Kd3X6xIbICYMPdTf2k M9l9Hro= X-Received: by 2002:a05:690c:7245:b0:797:a27b:864c with SMTP id 00721157ae682-79a1c184589mr106101407b3.38.1773597900922; Sun, 15 Mar 2026 11:05:00 -0700 (PDT) Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: In-Reply-To: Date: Sun, 15 Mar 2026 11:04:25 -0700 X-Gm-Features: AaiRm52px_rV-a5Tz0InkKu5klYl60rNmTXSeMXCZv1ErpVjf3f_GS3VpS4hltM Message-ID: Subject: Re: [PHP-DEV] [RFC] [Discussion] Debugable enums To: Ilija Tovilo Cc: php internals Content-Type: multipart/alternative; boundary="000000000000dbe1b1064d13f053" From: daniel.e.scherzer@gmail.com (Daniel Scherzer) --000000000000dbe1b1064d13f053 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Mar 15, 2026 at 11:01=E2=80=AFAM Ilija Tovilo wrote: > Hi Daniel > > On Fri, Mar 13, 2026 at 1:06=E2=80=AFAM Daniel Scherzer > wrote: > > > > I'd like to start the discussion for a new RFC about removing the > prohibition on __debugInfo() methods on enums. > > > > * RFC: https://wiki.php.net/rfc/debugable-enums > > * Implementation: https://github.com/php/php-src/pull/21425 > > The RFC currently only mentions: > > > var_dump(Foo::Bar); // produces an array with "Bar is a case of the Foo > enum" > > But it would be good for it to spell out the full output for the > examples. > Done, examples now show the full output > From the implementation, I can see: > > > object(Foo)#%d (1) { > > [0]=3D> > > string(14) "Foo::Bar =3D Baz" > > } > > I think the enum(Foo::Bar) header should be preserved. If the user > wants to print some ancillary data for some reason, I wouldn't object > to that. > Done, the header is now preserved. I also removed the object handler identifier, which I don't think is as needed with enums. Based on my understanding of the RFC policy ( https://github.com/php/policies/blob/main/feature-proposals.rst), this qualifies as a major change, so there is now a cooldown period of 14 days before the earliest that a vote could start. -Daniel --000000000000dbe1b1064d13f053 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Sun, Mar 15, 202= 6 at 11:01=E2=80=AFAM Ilija Tovilo <tovilo.ilija@gmail.com> wrote:
Hi Daniel

On Fri, Mar 13, 2026 at 1:06=E2=80=AFAM Daniel Scherzer
<daniel= .e.scherzer@gmail.com> wrote:
>
> I'd like to start the discussion for a new RFC about removing the = prohibition on __debugInfo() methods on enums.
>
> * RFC: https://wiki.php.net/rfc/debugable-enums
> * Implementation: https://github.com/php/php-src/pull/= 21425

The RFC currently only mentions:

> var_dump(Foo::Bar); // produces an array with "Bar is a case of t= he Foo enum"

But it would be good for it to spell out the full output for the
examples.

Done, examples now show the f= ull output
=C2=A0
From the implementation, I can see:

> object(Foo)#%d (1) {
>=C2=A0 [0]=3D>
>=C2=A0 string(14) "Foo::Bar =3D Baz"
> }

I think the enum(Foo::Bar) header should be preserved. If the user
wants to print some ancillary data for some reason, I wouldn't object to that.

Done, the header is now preser= ved. I also removed the object handler identifier, which I don't think = is as needed with enums.

Based on my understanding= of the RFC policy (https://github.com/php/policies/blob/main/feature-prop= osals.rst), this qualifies as a major change, so there is now a cooldow= n period of 14 days before the earliest that a vote could start.
=
-Daniel
--000000000000dbe1b1064d13f053--