[PHP-DEV] [VOTE] enum SortDirection

Hi

I just opened voting on the “enum SortDirection” RFC.

The RFC document is available at: PHP: rfc:sort_direction_enum
You can find the Discussion at: php.internals: [RFC] enum SortDirection

The RFC contains a single primary vote requiring a 2/3 majority. Voting closes in just over 14 days on 2026-04-01 16:00:00 UTC.

Best regards
Tim Düsterhus

On Wed, Mar 18, 2026 at 9:52 AM Tim Düsterhus <tim@bastelstu.be> wrote:

Hi

I just opened voting on the “enum SortDirection” RFC.

The RFC document is available at:
PHP: rfc:sort_direction_enum
You can find the Discussion at:
php.internals: [RFC] enum SortDirection

The RFC contains a single primary vote requiring a 2/3 majority. Voting
closes in just over 14 days on 2026-04-01 16:00:00 UTC.

Best regards
Tim Düsterhus

Tim, I am curious if adding a backing value in a future release would
be considered a breaking change or not, something like:

enum SortDirection {
    case Ascending = 1;
    case Descending = -1;
}

The exact values don't matter for my question, only whether or not it
would be considered a backwards compatibility break.