1.2.426. Enum Case Values

Adds a DEFINITION`link between a `static Enumeration case and its actual defined value.

No link is added when no value is defined.

<?php

enum E: string {
   case Foo = 'foo';
}

// Constants
const C = E::Foo->name;

?>

1.2.426.1. Connex PHP features

1.2.426.1.1. Specs

Short name

Complete/EnumCaseValues

Rulesets

All, Changed Behavior

Exakat since

2.4.7

PHP Version

With PHP 8.1 and more recent

Severity

Minor

Time To Fix

Quick (30 mins)

Precision

High

Available in

Entreprise Edition, Exakat Cloud