PHP 8.3 Support: Typed class constants (Part 4)

- https://github.com/apache/netbeans/issues/6701
- https://wiki.php.net/rfc/typed_class_constants
- Fix the mark occurences and the go to declaration features
- Add unit tests
diff --git a/php/php.editor/src/org/netbeans/modules/php/editor/model/impl/ModelVisitor.java b/php/php.editor/src/org/netbeans/modules/php/editor/model/impl/ModelVisitor.java
index 34d5b3b..bba1f90 100644
--- a/php/php.editor/src/org/netbeans/modules/php/editor/model/impl/ModelVisitor.java
+++ b/php/php.editor/src/org/netbeans/modules/php/editor/model/impl/ModelVisitor.java
@@ -428,11 +428,27 @@
             occurencesBuilder.prepare(Kind.FUNCTION, namespaceName, fileScope);
         } else if (parent instanceof Program
                 || parent instanceof Block
-                || parent instanceof FieldsDeclaration
                 || isReturnType) {
             // return type
             Kind[] kinds = {Kind.CLASS, Kind.IFACE};
             occurencesBuilder.prepare(kinds, namespaceName, modelBuilder.getCurrentScope());
+        } else if (parent instanceof ConstantDeclaration
+                || parent instanceof FieldsDeclaration) {
+            if (!isDeclaredType(parent, namespaceName)) {
+                // e.g.
+                // const C = "example";
+                // class C {}
+                // class Example {
+                //     const string|C CONSTANNT = C;
+                //                  ^type         ^const
+                //     private string|C $field = C;
+                //                    ^type      ^const
+                // }
+                occurencesBuilder.prepare(Kind.CONSTANT, namespaceName, fileScope);
+                // don't invoke the following to avoid being marked as a type name
+                // occurencesBuilder.prepare(namespaceName, modelBuilder.getCurrentScope());
+                return;
+            }
         } else if (parent instanceof ClassInstanceCreation) {
             if (((ClassInstanceCreation) parent).isAnonymous()) {
                 // superclass, ifaces
@@ -450,6 +466,24 @@
         }
     }
 
+    private boolean isDeclaredType(ASTNode node, NamespaceName namespaceName) {
+        boolean isDeclaredType = false;
+        Expression declaredType = null;
+        if (node instanceof ConstantDeclaration) {
+            ConstantDeclaration constantDeclaration = (ConstantDeclaration) node;
+            declaredType = constantDeclaration.getConstType();
+        } else if (node instanceof FieldsDeclaration) {
+            FieldsDeclaration fieldsDeclaration = (FieldsDeclaration) node;
+            declaredType = fieldsDeclaration.getFieldType();
+        }
+        if (declaredType != null
+                && declaredType.getStartOffset() <= namespaceName.getStartOffset()
+                && namespaceName.getStartOffset() <= declaredType.getEndOffset()) {
+            isDeclaredType = true;
+        }
+        return isDeclaredType;
+    }
+
     @Override
     public void visit(SingleUseStatementPart statementPart) {
         ASTNode parent = getPath().get(0);
@@ -756,12 +790,14 @@
     public void visit(ConstantDeclaration node) {
         Scope scope = modelBuilder.getCurrentScope();
         if (scope instanceof NamespaceScope) {
+            // global constants
             List<? extends ConstantDeclarationInfo> constantDeclarationInfos = ConstantDeclarationInfo.create(node);
             for (ConstantDeclarationInfo nodeInfo : constantDeclarationInfos) {
                 ConstantElementImpl createElement = modelBuilder.getCurrentNameSpace().createElement(nodeInfo);
                 occurencesBuilder.prepare(nodeInfo, createElement);
             }
         } else {
+            // class constants
             modelBuilder.build(node, occurencesBuilder);
         }
         super.visit(node);
diff --git a/php/php.editor/src/org/netbeans/modules/php/editor/parser/astnodes/ConstantDeclaration.java b/php/php.editor/src/org/netbeans/modules/php/editor/parser/astnodes/ConstantDeclaration.java
index 5c6e03b..19140f1 100644
--- a/php/php.editor/src/org/netbeans/modules/php/editor/parser/astnodes/ConstantDeclaration.java
+++ b/php/php.editor/src/org/netbeans/modules/php/editor/parser/astnodes/ConstantDeclaration.java
@@ -24,6 +24,7 @@
 import java.util.List;
 import org.netbeans.api.annotations.common.CheckForNull;
 import org.netbeans.api.annotations.common.NullAllowed;
+import org.netbeans.modules.php.editor.model.impl.VariousUtils;
 
 /**
  * Represents a class or namespace constant declaration.
@@ -127,10 +128,18 @@
         StringBuilder sbAttributes = new StringBuilder();
         getAttributes().forEach(attribute -> sbAttributes.append(attribute).append(" ")); // NOI18N
         StringBuilder sb = new StringBuilder();
-        for (Expression expression : getInitializers()) {
-            sb.append(expression).append(","); //NOI18N
+        for (int i = 0; i < names.size(); i++) {
+            Expression initializer = initializers.get(i);
+            sb.append(names.get(i)).append(" = ").append(initializer).append(","); // NOI18N
         }
-        return sbAttributes.toString() + getModifierString() + "const " + sb; //NOI18N
+        if (sb.length() > 0) {
+            sb.deleteCharAt(sb.length() - 1); // delete last ","
+        }
+        return sbAttributes.toString()
+                + (!getModifierString().isEmpty() ? getModifierString() + " " : "") // NOI18N
+                + "const " // NOI18N
+                + (getConstType() != null ? VariousUtils.getDeclaredType(getConstType()) + " " : "") // NOI18N
+                + sb;
     }
 
 }
diff --git a/php/php.editor/test/unit/data/testfiles/gotodeclaration/php83/testTypedClassConstants/testTypedClassConstants.php b/php/php.editor/test/unit/data/testfiles/gotodeclaration/php83/testTypedClassConstants/testTypedClassConstants.php
new file mode 100644
index 0000000..3bc16cd
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/gotodeclaration/php83/testTypedClassConstants/testTypedClassConstants.php
@@ -0,0 +1,93 @@
+<?php
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+class A implements Stringable {
+    public function __toString() {
+        return static::class;
+    }
+}
+
+class B extends A {}
+class C extends A {}
+
+class ClassTest {
+    public const WITHOUT_TYPE = 1;
+    public const ?A NULLABLE = null;
+    public const ?int NULLABLE2 = 1;
+    private const A|B UNION = A;
+    protected const A&B INTERSECTION = B;
+    public const (A&B)|C DNF = C;
+    public const string STRING = 'a';
+    public const int INT = 1;
+    public const float FLOAT = 1.5;
+    public const bool BOOL = true;
+    public const array ARRAY = ['t', 'e', 's', 't'];
+    public const iterable ITERABLE = ['a', 'b', 'c'];
+    public const mixed MIXED = 1 + self::WITHOUT_TYPE;
+    public const object OBJECT = A;
+    public const string|array UNION2 = 'a' . InterfaceTest::STRING;
+    public const int|null UNION3 = null;
+}
+
+interface InterfaceTest {
+    const string STRING = "string"; // interface
+    public const ?int NULLABLE = 1; // interface
+    public const A|B UNION = A; // interface
+    public const A&B INTERSECTION = B; // interface
+    public const (A&B)|C DNF = C; // interface
+}
+
+trait TraitTest {
+    const string STRING = "string"; // trait
+    public const ?int NULLABLE = 1; // trait
+    private const A|B UNION = A; // trait
+    protected const A&B INTERSECTION = B; // trait
+    public const (A&B)|C DNF = C; // trait
+}
+
+enum EnumTest {
+    const string STRING = "string"; // enum
+    public const ?int NULLABLE = 1; // enum
+    private const A|B UNION = A; // enum
+    protected const A&B INTERSECTION = B; // enum
+    public const (A&B)|(A&C) DNF = C; // enum
+    public const static A = EnumTest::Test; // enum
+
+    case Test;
+}
+
+define("A", new A());
+define("B", new B());
+define("C", new C());
+
+var_dump(ClassTest::WITHOUT_TYPE);
+var_dump(ClassTest::NULLABLE);
+var_dump(ClassTest::UNION);
+var_dump(ClassTest::INTERSECTION);
+var_dump(ClassTest::DNF);
+var_dump(ClassTest::STRING);
+var_dump(ClassTest::INT);
+var_dump(ClassTest::FLOAT);
+var_dump(ClassTest::BOOL);
+var_dump(ClassTest::ARRAY);
+var_dump(ClassTest::ITERABLE);
+var_dump(ClassTest::MIXED);
+var_dump(ClassTest::OBJECT);
+var_dump(ClassTest::UNION2);
+var_dump(ClassTest::UNION3);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php
new file mode 100644
index 0000000..d27adb1
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php
@@ -0,0 +1,92 @@
+<?php
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+class A implements Stringable {
+    public function __toString() {
+        return static::class;
+    }
+}
+
+class B extends A {}
+class C extends A {}
+
+class ClassTest {
+    public const WITHOUT_TYPE = 1;
+    public const ?A NULLABLE = null;
+    private const A|B UNION = A;
+    protected const A&B INTERSECTION = B;
+    public const (A&B)|C DNF = C;
+    public const string STRING = 'a';
+    public const int INT = 1;
+    public const float FLOAT = 1.5;
+    public const bool BOOL = true;
+    public const array ARRAY = ['t', 'e', 's', 't'];
+    public const iterable ITERABLE = ['a', 'b', 'c'];
+    public const mixed MIXED = 1 + self::WITHOUT_TYPE;
+    public const object OBJECT = A;
+    public const string|array UNION2 = 'a' . InterfaceTest::STRING;
+    public const int|null UNION3 = null;
+}
+
+interface InterfaceTest {
+    const string STRING = "string"; // interface
+    public const ?int NULLABLE = 1; // interface
+    public const A|B UNION = A; // interface
+    public const A&B INTERSECTION = B; // interface
+    public const (A&B)|C DNF = C; // interface
+}
+
+trait TraitTest {
+    const string STRING = "string"; // trait
+    public const ?int NULLABLE = 1; // trait
+    private const A|B UNION = A; // trait
+    protected const A&B INTERSECTION = B; // trait
+    public const (A&B)|C DNF = C; // trait
+}
+
+enum EnumTest {
+    const string STRING = "string"; // enum
+    public const ?int NULLABLE = 1; // enum
+    private const A|B UNION = A; // enum
+    protected const A&B INTERSECTION = B; // enum
+    public const (A&B)|(A&C) DNF = C; // enum
+    public const static A = EnumTest::Test; // enum
+
+    case Test;
+}
+
+define("A", new A());
+define("B", new B());
+define("C", new C());
+
+var_dump(ClassTest::WITHOUT_TYPE);
+var_dump(ClassTest::NULLABLE);
+var_dump(ClassTest::UNION);
+var_dump(ClassTest::INTERSECTION);
+var_dump(ClassTest::DNF);
+var_dump(ClassTest::STRING);
+var_dump(ClassTest::INT);
+var_dump(ClassTest::FLOAT);
+var_dump(ClassTest::BOOL);
+var_dump(ClassTest::ARRAY);
+var_dump(ClassTest::ITERABLE);
+var_dump(ClassTest::MIXED);
+var_dump(ClassTest::OBJECT);
+var_dump(ClassTest::UNION2);
+var_dump(ClassTest::UNION3);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01a.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01a.occurrences
new file mode 100644
index 0000000..2bd05a7
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01a.occurrences
@@ -0,0 +1,17 @@
+class ^|>MARK_OCCURRENCES:A<| implements Stringable {
+class B extends |>MARK_OCCURRENCES:A<| {}
+class C extends |>MARK_OCCURRENCES:A<| {}
+    public const ?|>MARK_OCCURRENCES:A<| NULLABLE = null;
+    private const |>MARK_OCCURRENCES:A<||B UNION = A;
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B;
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C;
+    public const |>MARK_OCCURRENCES:A<||B UNION = A; // interface
+    public const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // interface
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C; // interface
+    private const |>MARK_OCCURRENCES:A<||B UNION = A; // trait
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // trait
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C; // trait
+    private const |>MARK_OCCURRENCES:A<||B UNION = A; // enum
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // enum
+    public const (|>MARK_OCCURRENCES:A<|&B)|(|>MARK_OCCURRENCES:A<|&C) DNF = C; // enum
+define("A", new |>MARK_OCCURRENCES:A<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01b.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01b.occurrences
new file mode 100644
index 0000000..c1a507c
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01b.occurrences
@@ -0,0 +1,17 @@
+class |>MARK_OCCURRENCES:A<| implements Stringable {
+class B extends ^|>MARK_OCCURRENCES:A<| {}
+class C extends |>MARK_OCCURRENCES:A<| {}
+    public const ?|>MARK_OCCURRENCES:A<| NULLABLE = null;
+    private const |>MARK_OCCURRENCES:A<||B UNION = A;
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B;
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C;
+    public const |>MARK_OCCURRENCES:A<||B UNION = A; // interface
+    public const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // interface
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C; // interface
+    private const |>MARK_OCCURRENCES:A<||B UNION = A; // trait
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // trait
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C; // trait
+    private const |>MARK_OCCURRENCES:A<||B UNION = A; // enum
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // enum
+    public const (|>MARK_OCCURRENCES:A<|&B)|(|>MARK_OCCURRENCES:A<|&C) DNF = C; // enum
+define("A", new |>MARK_OCCURRENCES:A<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01c.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01c.occurrences
new file mode 100644
index 0000000..9b27700
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01c.occurrences
@@ -0,0 +1,17 @@
+class |>MARK_OCCURRENCES:A<| implements Stringable {
+class B extends |>MARK_OCCURRENCES:A<| {}
+class C extends ^|>MARK_OCCURRENCES:A<| {}
+    public const ?|>MARK_OCCURRENCES:A<| NULLABLE = null;
+    private const |>MARK_OCCURRENCES:A<||B UNION = A;
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B;
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C;
+    public const |>MARK_OCCURRENCES:A<||B UNION = A; // interface
+    public const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // interface
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C; // interface
+    private const |>MARK_OCCURRENCES:A<||B UNION = A; // trait
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // trait
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C; // trait
+    private const |>MARK_OCCURRENCES:A<||B UNION = A; // enum
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // enum
+    public const (|>MARK_OCCURRENCES:A<|&B)|(|>MARK_OCCURRENCES:A<|&C) DNF = C; // enum
+define("A", new |>MARK_OCCURRENCES:A<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01d.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01d.occurrences
new file mode 100644
index 0000000..d25c15b
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01d.occurrences
@@ -0,0 +1,17 @@
+class |>MARK_OCCURRENCES:A<| implements Stringable {
+class B extends |>MARK_OCCURRENCES:A<| {}
+class C extends |>MARK_OCCURRENCES:A<| {}
+    public const ?^|>MARK_OCCURRENCES:A<| NULLABLE = null;
+    private const |>MARK_OCCURRENCES:A<||B UNION = A;
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B;
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C;
+    public const |>MARK_OCCURRENCES:A<||B UNION = A; // interface
+    public const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // interface
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C; // interface
+    private const |>MARK_OCCURRENCES:A<||B UNION = A; // trait
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // trait
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C; // trait
+    private const |>MARK_OCCURRENCES:A<||B UNION = A; // enum
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // enum
+    public const (|>MARK_OCCURRENCES:A<|&B)|(|>MARK_OCCURRENCES:A<|&C) DNF = C; // enum
+define("A", new |>MARK_OCCURRENCES:A<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01e.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01e.occurrences
new file mode 100644
index 0000000..cf72c07
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01e.occurrences
@@ -0,0 +1,17 @@
+class |>MARK_OCCURRENCES:A<| implements Stringable {
+class B extends |>MARK_OCCURRENCES:A<| {}
+class C extends |>MARK_OCCURRENCES:A<| {}
+    public const ?|>MARK_OCCURRENCES:A<| NULLABLE = null;
+    private const ^|>MARK_OCCURRENCES:A<||B UNION = A;
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B;
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C;
+    public const |>MARK_OCCURRENCES:A<||B UNION = A; // interface
+    public const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // interface
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C; // interface
+    private const |>MARK_OCCURRENCES:A<||B UNION = A; // trait
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // trait
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C; // trait
+    private const |>MARK_OCCURRENCES:A<||B UNION = A; // enum
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // enum
+    public const (|>MARK_OCCURRENCES:A<|&B)|(|>MARK_OCCURRENCES:A<|&C) DNF = C; // enum
+define("A", new |>MARK_OCCURRENCES:A<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01f.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01f.occurrences
new file mode 100644
index 0000000..0e52003
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01f.occurrences
@@ -0,0 +1,17 @@
+class |>MARK_OCCURRENCES:A<| implements Stringable {
+class B extends |>MARK_OCCURRENCES:A<| {}
+class C extends |>MARK_OCCURRENCES:A<| {}
+    public const ?|>MARK_OCCURRENCES:A<| NULLABLE = null;
+    private const |>MARK_OCCURRENCES:A<||B UNION = A;
+    protected const ^|>MARK_OCCURRENCES:A<|&B INTERSECTION = B;
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C;
+    public const |>MARK_OCCURRENCES:A<||B UNION = A; // interface
+    public const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // interface
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C; // interface
+    private const |>MARK_OCCURRENCES:A<||B UNION = A; // trait
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // trait
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C; // trait
+    private const |>MARK_OCCURRENCES:A<||B UNION = A; // enum
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // enum
+    public const (|>MARK_OCCURRENCES:A<|&B)|(|>MARK_OCCURRENCES:A<|&C) DNF = C; // enum
+define("A", new |>MARK_OCCURRENCES:A<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01g.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01g.occurrences
new file mode 100644
index 0000000..bf49282
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01g.occurrences
@@ -0,0 +1,17 @@
+class |>MARK_OCCURRENCES:A<| implements Stringable {
+class B extends |>MARK_OCCURRENCES:A<| {}
+class C extends |>MARK_OCCURRENCES:A<| {}
+    public const ?|>MARK_OCCURRENCES:A<| NULLABLE = null;
+    private const |>MARK_OCCURRENCES:A<||B UNION = A;
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B;
+    public const (^|>MARK_OCCURRENCES:A<|&B)|C DNF = C;
+    public const |>MARK_OCCURRENCES:A<||B UNION = A; // interface
+    public const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // interface
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C; // interface
+    private const |>MARK_OCCURRENCES:A<||B UNION = A; // trait
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // trait
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C; // trait
+    private const |>MARK_OCCURRENCES:A<||B UNION = A; // enum
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // enum
+    public const (|>MARK_OCCURRENCES:A<|&B)|(|>MARK_OCCURRENCES:A<|&C) DNF = C; // enum
+define("A", new |>MARK_OCCURRENCES:A<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01h.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01h.occurrences
new file mode 100644
index 0000000..9a8384b
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01h.occurrences
@@ -0,0 +1,17 @@
+class |>MARK_OCCURRENCES:A<| implements Stringable {
+class B extends |>MARK_OCCURRENCES:A<| {}
+class C extends |>MARK_OCCURRENCES:A<| {}
+    public const ?|>MARK_OCCURRENCES:A<| NULLABLE = null;
+    private const |>MARK_OCCURRENCES:A<||B UNION = A;
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B;
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C;
+    public const ^|>MARK_OCCURRENCES:A<||B UNION = A; // interface
+    public const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // interface
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C; // interface
+    private const |>MARK_OCCURRENCES:A<||B UNION = A; // trait
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // trait
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C; // trait
+    private const |>MARK_OCCURRENCES:A<||B UNION = A; // enum
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // enum
+    public const (|>MARK_OCCURRENCES:A<|&B)|(|>MARK_OCCURRENCES:A<|&C) DNF = C; // enum
+define("A", new |>MARK_OCCURRENCES:A<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01i.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01i.occurrences
new file mode 100644
index 0000000..0ed2aec
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01i.occurrences
@@ -0,0 +1,17 @@
+class |>MARK_OCCURRENCES:A<| implements Stringable {
+class B extends |>MARK_OCCURRENCES:A<| {}
+class C extends |>MARK_OCCURRENCES:A<| {}
+    public const ?|>MARK_OCCURRENCES:A<| NULLABLE = null;
+    private const |>MARK_OCCURRENCES:A<||B UNION = A;
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B;
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C;
+    public const |>MARK_OCCURRENCES:A<||B UNION = A; // interface
+    public const ^|>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // interface
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C; // interface
+    private const |>MARK_OCCURRENCES:A<||B UNION = A; // trait
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // trait
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C; // trait
+    private const |>MARK_OCCURRENCES:A<||B UNION = A; // enum
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // enum
+    public const (|>MARK_OCCURRENCES:A<|&B)|(|>MARK_OCCURRENCES:A<|&C) DNF = C; // enum
+define("A", new |>MARK_OCCURRENCES:A<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01j.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01j.occurrences
new file mode 100644
index 0000000..865dcb9
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01j.occurrences
@@ -0,0 +1,17 @@
+class |>MARK_OCCURRENCES:A<| implements Stringable {
+class B extends |>MARK_OCCURRENCES:A<| {}
+class C extends |>MARK_OCCURRENCES:A<| {}
+    public const ?|>MARK_OCCURRENCES:A<| NULLABLE = null;
+    private const |>MARK_OCCURRENCES:A<||B UNION = A;
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B;
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C;
+    public const |>MARK_OCCURRENCES:A<||B UNION = A; // interface
+    public const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // interface
+    public const (^|>MARK_OCCURRENCES:A<|&B)|C DNF = C; // interface
+    private const |>MARK_OCCURRENCES:A<||B UNION = A; // trait
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // trait
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C; // trait
+    private const |>MARK_OCCURRENCES:A<||B UNION = A; // enum
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // enum
+    public const (|>MARK_OCCURRENCES:A<|&B)|(|>MARK_OCCURRENCES:A<|&C) DNF = C; // enum
+define("A", new |>MARK_OCCURRENCES:A<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01k.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01k.occurrences
new file mode 100644
index 0000000..b834c0c
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01k.occurrences
@@ -0,0 +1,17 @@
+class |>MARK_OCCURRENCES:A<| implements Stringable {
+class B extends |>MARK_OCCURRENCES:A<| {}
+class C extends |>MARK_OCCURRENCES:A<| {}
+    public const ?|>MARK_OCCURRENCES:A<| NULLABLE = null;
+    private const |>MARK_OCCURRENCES:A<||B UNION = A;
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B;
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C;
+    public const |>MARK_OCCURRENCES:A<||B UNION = A; // interface
+    public const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // interface
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C; // interface
+    private const ^|>MARK_OCCURRENCES:A<||B UNION = A; // trait
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // trait
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C; // trait
+    private const |>MARK_OCCURRENCES:A<||B UNION = A; // enum
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // enum
+    public const (|>MARK_OCCURRENCES:A<|&B)|(|>MARK_OCCURRENCES:A<|&C) DNF = C; // enum
+define("A", new |>MARK_OCCURRENCES:A<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01l.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01l.occurrences
new file mode 100644
index 0000000..3baede3
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01l.occurrences
@@ -0,0 +1,17 @@
+class |>MARK_OCCURRENCES:A<| implements Stringable {
+class B extends |>MARK_OCCURRENCES:A<| {}
+class C extends |>MARK_OCCURRENCES:A<| {}
+    public const ?|>MARK_OCCURRENCES:A<| NULLABLE = null;
+    private const |>MARK_OCCURRENCES:A<||B UNION = A;
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B;
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C;
+    public const |>MARK_OCCURRENCES:A<||B UNION = A; // interface
+    public const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // interface
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C; // interface
+    private const |>MARK_OCCURRENCES:A<||B UNION = A; // trait
+    protected const ^|>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // trait
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C; // trait
+    private const |>MARK_OCCURRENCES:A<||B UNION = A; // enum
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // enum
+    public const (|>MARK_OCCURRENCES:A<|&B)|(|>MARK_OCCURRENCES:A<|&C) DNF = C; // enum
+define("A", new |>MARK_OCCURRENCES:A<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01m.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01m.occurrences
new file mode 100644
index 0000000..d35dca1
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01m.occurrences
@@ -0,0 +1,17 @@
+class |>MARK_OCCURRENCES:A<| implements Stringable {
+class B extends |>MARK_OCCURRENCES:A<| {}
+class C extends |>MARK_OCCURRENCES:A<| {}
+    public const ?|>MARK_OCCURRENCES:A<| NULLABLE = null;
+    private const |>MARK_OCCURRENCES:A<||B UNION = A;
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B;
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C;
+    public const |>MARK_OCCURRENCES:A<||B UNION = A; // interface
+    public const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // interface
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C; // interface
+    private const |>MARK_OCCURRENCES:A<||B UNION = A; // trait
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // trait
+    public const (^|>MARK_OCCURRENCES:A<|&B)|C DNF = C; // trait
+    private const |>MARK_OCCURRENCES:A<||B UNION = A; // enum
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // enum
+    public const (|>MARK_OCCURRENCES:A<|&B)|(|>MARK_OCCURRENCES:A<|&C) DNF = C; // enum
+define("A", new |>MARK_OCCURRENCES:A<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01n.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01n.occurrences
new file mode 100644
index 0000000..fdfcdf4
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01n.occurrences
@@ -0,0 +1,17 @@
+class |>MARK_OCCURRENCES:A<| implements Stringable {
+class B extends |>MARK_OCCURRENCES:A<| {}
+class C extends |>MARK_OCCURRENCES:A<| {}
+    public const ?|>MARK_OCCURRENCES:A<| NULLABLE = null;
+    private const |>MARK_OCCURRENCES:A<||B UNION = A;
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B;
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C;
+    public const |>MARK_OCCURRENCES:A<||B UNION = A; // interface
+    public const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // interface
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C; // interface
+    private const |>MARK_OCCURRENCES:A<||B UNION = A; // trait
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // trait
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C; // trait
+    private const ^|>MARK_OCCURRENCES:A<||B UNION = A; // enum
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // enum
+    public const (|>MARK_OCCURRENCES:A<|&B)|(|>MARK_OCCURRENCES:A<|&C) DNF = C; // enum
+define("A", new |>MARK_OCCURRENCES:A<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01o.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01o.occurrences
new file mode 100644
index 0000000..073c3b9
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01o.occurrences
@@ -0,0 +1,17 @@
+class |>MARK_OCCURRENCES:A<| implements Stringable {
+class B extends |>MARK_OCCURRENCES:A<| {}
+class C extends |>MARK_OCCURRENCES:A<| {}
+    public const ?|>MARK_OCCURRENCES:A<| NULLABLE = null;
+    private const |>MARK_OCCURRENCES:A<||B UNION = A;
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B;
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C;
+    public const |>MARK_OCCURRENCES:A<||B UNION = A; // interface
+    public const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // interface
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C; // interface
+    private const |>MARK_OCCURRENCES:A<||B UNION = A; // trait
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // trait
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C; // trait
+    private const |>MARK_OCCURRENCES:A<||B UNION = A; // enum
+    protected const ^|>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // enum
+    public const (|>MARK_OCCURRENCES:A<|&B)|(|>MARK_OCCURRENCES:A<|&C) DNF = C; // enum
+define("A", new |>MARK_OCCURRENCES:A<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01p.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01p.occurrences
new file mode 100644
index 0000000..1c6978a
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01p.occurrences
@@ -0,0 +1,17 @@
+class |>MARK_OCCURRENCES:A<| implements Stringable {
+class B extends |>MARK_OCCURRENCES:A<| {}
+class C extends |>MARK_OCCURRENCES:A<| {}
+    public const ?|>MARK_OCCURRENCES:A<| NULLABLE = null;
+    private const |>MARK_OCCURRENCES:A<||B UNION = A;
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B;
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C;
+    public const |>MARK_OCCURRENCES:A<||B UNION = A; // interface
+    public const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // interface
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C; // interface
+    private const |>MARK_OCCURRENCES:A<||B UNION = A; // trait
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // trait
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C; // trait
+    private const |>MARK_OCCURRENCES:A<||B UNION = A; // enum
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // enum
+    public const (^|>MARK_OCCURRENCES:A<|&B)|(|>MARK_OCCURRENCES:A<|&C) DNF = C; // enum
+define("A", new |>MARK_OCCURRENCES:A<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01q.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01q.occurrences
new file mode 100644
index 0000000..96d4a7d
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01q.occurrences
@@ -0,0 +1,17 @@
+class |>MARK_OCCURRENCES:A<| implements Stringable {
+class B extends |>MARK_OCCURRENCES:A<| {}
+class C extends |>MARK_OCCURRENCES:A<| {}
+    public const ?|>MARK_OCCURRENCES:A<| NULLABLE = null;
+    private const |>MARK_OCCURRENCES:A<||B UNION = A;
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B;
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C;
+    public const |>MARK_OCCURRENCES:A<||B UNION = A; // interface
+    public const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // interface
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C; // interface
+    private const |>MARK_OCCURRENCES:A<||B UNION = A; // trait
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // trait
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C; // trait
+    private const |>MARK_OCCURRENCES:A<||B UNION = A; // enum
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // enum
+    public const (|>MARK_OCCURRENCES:A<|&B)|(^|>MARK_OCCURRENCES:A<|&C) DNF = C; // enum
+define("A", new |>MARK_OCCURRENCES:A<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01r.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01r.occurrences
new file mode 100644
index 0000000..7ea1f38
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_01r.occurrences
@@ -0,0 +1,17 @@
+class |>MARK_OCCURRENCES:A<| implements Stringable {
+class B extends |>MARK_OCCURRENCES:A<| {}
+class C extends |>MARK_OCCURRENCES:A<| {}
+    public const ?|>MARK_OCCURRENCES:A<| NULLABLE = null;
+    private const |>MARK_OCCURRENCES:A<||B UNION = A;
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B;
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C;
+    public const |>MARK_OCCURRENCES:A<||B UNION = A; // interface
+    public const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // interface
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C; // interface
+    private const |>MARK_OCCURRENCES:A<||B UNION = A; // trait
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // trait
+    public const (|>MARK_OCCURRENCES:A<|&B)|C DNF = C; // trait
+    private const |>MARK_OCCURRENCES:A<||B UNION = A; // enum
+    protected const |>MARK_OCCURRENCES:A<|&B INTERSECTION = B; // enum
+    public const (|>MARK_OCCURRENCES:A<|&B)|(|>MARK_OCCURRENCES:A<|&C) DNF = C; // enum
+define("A", new ^|>MARK_OCCURRENCES:A<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02a.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02a.occurrences
new file mode 100644
index 0000000..ccf0b23
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02a.occurrences
@@ -0,0 +1,14 @@
+class ^|>MARK_OCCURRENCES:B<| extends A {}
+    private const A||>MARK_OCCURRENCES:B<| UNION = A;
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B;
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C;
+    public const A||>MARK_OCCURRENCES:B<| UNION = A; // interface
+    public const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // interface
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C; // interface
+    private const A||>MARK_OCCURRENCES:B<| UNION = A; // trait
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // trait
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C; // trait
+    private const A||>MARK_OCCURRENCES:B<| UNION = A; // enum
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // enum
+    public const (A&|>MARK_OCCURRENCES:B<|)|(A&C) DNF = C; // enum
+define("B", new |>MARK_OCCURRENCES:B<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02b.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02b.occurrences
new file mode 100644
index 0000000..b8453fa
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02b.occurrences
@@ -0,0 +1,14 @@
+class |>MARK_OCCURRENCES:B<| extends A {}
+    private const A|^|>MARK_OCCURRENCES:B<| UNION = A;
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B;
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C;
+    public const A||>MARK_OCCURRENCES:B<| UNION = A; // interface
+    public const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // interface
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C; // interface
+    private const A||>MARK_OCCURRENCES:B<| UNION = A; // trait
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // trait
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C; // trait
+    private const A||>MARK_OCCURRENCES:B<| UNION = A; // enum
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // enum
+    public const (A&|>MARK_OCCURRENCES:B<|)|(A&C) DNF = C; // enum
+define("B", new |>MARK_OCCURRENCES:B<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02c.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02c.occurrences
new file mode 100644
index 0000000..cc307fb
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02c.occurrences
@@ -0,0 +1,14 @@
+class |>MARK_OCCURRENCES:B<| extends A {}
+    private const A||>MARK_OCCURRENCES:B<| UNION = A;
+    protected const A&^|>MARK_OCCURRENCES:B<| INTERSECTION = B;
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C;
+    public const A||>MARK_OCCURRENCES:B<| UNION = A; // interface
+    public const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // interface
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C; // interface
+    private const A||>MARK_OCCURRENCES:B<| UNION = A; // trait
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // trait
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C; // trait
+    private const A||>MARK_OCCURRENCES:B<| UNION = A; // enum
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // enum
+    public const (A&|>MARK_OCCURRENCES:B<|)|(A&C) DNF = C; // enum
+define("B", new |>MARK_OCCURRENCES:B<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02d.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02d.occurrences
new file mode 100644
index 0000000..7f2c9899
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02d.occurrences
@@ -0,0 +1,14 @@
+class |>MARK_OCCURRENCES:B<| extends A {}
+    private const A||>MARK_OCCURRENCES:B<| UNION = A;
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B;
+    public const (A&^|>MARK_OCCURRENCES:B<|)|C DNF = C;
+    public const A||>MARK_OCCURRENCES:B<| UNION = A; // interface
+    public const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // interface
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C; // interface
+    private const A||>MARK_OCCURRENCES:B<| UNION = A; // trait
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // trait
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C; // trait
+    private const A||>MARK_OCCURRENCES:B<| UNION = A; // enum
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // enum
+    public const (A&|>MARK_OCCURRENCES:B<|)|(A&C) DNF = C; // enum
+define("B", new |>MARK_OCCURRENCES:B<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02e.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02e.occurrences
new file mode 100644
index 0000000..3f1a1be
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02e.occurrences
@@ -0,0 +1,14 @@
+class |>MARK_OCCURRENCES:B<| extends A {}
+    private const A||>MARK_OCCURRENCES:B<| UNION = A;
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B;
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C;
+    public const A|^|>MARK_OCCURRENCES:B<| UNION = A; // interface
+    public const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // interface
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C; // interface
+    private const A||>MARK_OCCURRENCES:B<| UNION = A; // trait
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // trait
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C; // trait
+    private const A||>MARK_OCCURRENCES:B<| UNION = A; // enum
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // enum
+    public const (A&|>MARK_OCCURRENCES:B<|)|(A&C) DNF = C; // enum
+define("B", new |>MARK_OCCURRENCES:B<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02f.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02f.occurrences
new file mode 100644
index 0000000..9b2cdfd
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02f.occurrences
@@ -0,0 +1,14 @@
+class |>MARK_OCCURRENCES:B<| extends A {}
+    private const A||>MARK_OCCURRENCES:B<| UNION = A;
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B;
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C;
+    public const A||>MARK_OCCURRENCES:B<| UNION = A; // interface
+    public const A&^|>MARK_OCCURRENCES:B<| INTERSECTION = B; // interface
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C; // interface
+    private const A||>MARK_OCCURRENCES:B<| UNION = A; // trait
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // trait
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C; // trait
+    private const A||>MARK_OCCURRENCES:B<| UNION = A; // enum
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // enum
+    public const (A&|>MARK_OCCURRENCES:B<|)|(A&C) DNF = C; // enum
+define("B", new |>MARK_OCCURRENCES:B<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02g.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02g.occurrences
new file mode 100644
index 0000000..305c32d
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02g.occurrences
@@ -0,0 +1,14 @@
+class |>MARK_OCCURRENCES:B<| extends A {}
+    private const A||>MARK_OCCURRENCES:B<| UNION = A;
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B;
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C;
+    public const A||>MARK_OCCURRENCES:B<| UNION = A; // interface
+    public const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // interface
+    public const (A&^|>MARK_OCCURRENCES:B<|)|C DNF = C; // interface
+    private const A||>MARK_OCCURRENCES:B<| UNION = A; // trait
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // trait
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C; // trait
+    private const A||>MARK_OCCURRENCES:B<| UNION = A; // enum
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // enum
+    public const (A&|>MARK_OCCURRENCES:B<|)|(A&C) DNF = C; // enum
+define("B", new |>MARK_OCCURRENCES:B<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02h.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02h.occurrences
new file mode 100644
index 0000000..6837165
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02h.occurrences
@@ -0,0 +1,14 @@
+class |>MARK_OCCURRENCES:B<| extends A {}
+    private const A||>MARK_OCCURRENCES:B<| UNION = A;
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B;
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C;
+    public const A||>MARK_OCCURRENCES:B<| UNION = A; // interface
+    public const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // interface
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C; // interface
+    private const A|^|>MARK_OCCURRENCES:B<| UNION = A; // trait
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // trait
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C; // trait
+    private const A||>MARK_OCCURRENCES:B<| UNION = A; // enum
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // enum
+    public const (A&|>MARK_OCCURRENCES:B<|)|(A&C) DNF = C; // enum
+define("B", new |>MARK_OCCURRENCES:B<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02i.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02i.occurrences
new file mode 100644
index 0000000..8a3c855
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02i.occurrences
@@ -0,0 +1,14 @@
+class |>MARK_OCCURRENCES:B<| extends A {}
+    private const A||>MARK_OCCURRENCES:B<| UNION = A;
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B;
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C;
+    public const A||>MARK_OCCURRENCES:B<| UNION = A; // interface
+    public const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // interface
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C; // interface
+    private const A||>MARK_OCCURRENCES:B<| UNION = A; // trait
+    protected const A&^|>MARK_OCCURRENCES:B<| INTERSECTION = B; // trait
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C; // trait
+    private const A||>MARK_OCCURRENCES:B<| UNION = A; // enum
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // enum
+    public const (A&|>MARK_OCCURRENCES:B<|)|(A&C) DNF = C; // enum
+define("B", new |>MARK_OCCURRENCES:B<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02j.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02j.occurrences
new file mode 100644
index 0000000..a79d03d
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02j.occurrences
@@ -0,0 +1,14 @@
+class |>MARK_OCCURRENCES:B<| extends A {}
+    private const A||>MARK_OCCURRENCES:B<| UNION = A;
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B;
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C;
+    public const A||>MARK_OCCURRENCES:B<| UNION = A; // interface
+    public const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // interface
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C; // interface
+    private const A||>MARK_OCCURRENCES:B<| UNION = A; // trait
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // trait
+    public const (A&^|>MARK_OCCURRENCES:B<|)|C DNF = C; // trait
+    private const A||>MARK_OCCURRENCES:B<| UNION = A; // enum
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // enum
+    public const (A&|>MARK_OCCURRENCES:B<|)|(A&C) DNF = C; // enum
+define("B", new |>MARK_OCCURRENCES:B<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02k.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02k.occurrences
new file mode 100644
index 0000000..80143d0
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02k.occurrences
@@ -0,0 +1,14 @@
+class |>MARK_OCCURRENCES:B<| extends A {}
+    private const A||>MARK_OCCURRENCES:B<| UNION = A;
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B;
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C;
+    public const A||>MARK_OCCURRENCES:B<| UNION = A; // interface
+    public const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // interface
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C; // interface
+    private const A||>MARK_OCCURRENCES:B<| UNION = A; // trait
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // trait
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C; // trait
+    private const A|^|>MARK_OCCURRENCES:B<| UNION = A; // enum
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // enum
+    public const (A&|>MARK_OCCURRENCES:B<|)|(A&C) DNF = C; // enum
+define("B", new |>MARK_OCCURRENCES:B<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02l.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02l.occurrences
new file mode 100644
index 0000000..762e10c
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02l.occurrences
@@ -0,0 +1,14 @@
+class |>MARK_OCCURRENCES:B<| extends A {}
+    private const A||>MARK_OCCURRENCES:B<| UNION = A;
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B;
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C;
+    public const A||>MARK_OCCURRENCES:B<| UNION = A; // interface
+    public const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // interface
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C; // interface
+    private const A||>MARK_OCCURRENCES:B<| UNION = A; // trait
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // trait
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C; // trait
+    private const A||>MARK_OCCURRENCES:B<| UNION = A; // enum
+    protected const A&^|>MARK_OCCURRENCES:B<| INTERSECTION = B; // enum
+    public const (A&|>MARK_OCCURRENCES:B<|)|(A&C) DNF = C; // enum
+define("B", new |>MARK_OCCURRENCES:B<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02m.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02m.occurrences
new file mode 100644
index 0000000..a534218
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02m.occurrences
@@ -0,0 +1,14 @@
+class |>MARK_OCCURRENCES:B<| extends A {}
+    private const A||>MARK_OCCURRENCES:B<| UNION = A;
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B;
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C;
+    public const A||>MARK_OCCURRENCES:B<| UNION = A; // interface
+    public const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // interface
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C; // interface
+    private const A||>MARK_OCCURRENCES:B<| UNION = A; // trait
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // trait
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C; // trait
+    private const A||>MARK_OCCURRENCES:B<| UNION = A; // enum
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // enum
+    public const (A&^|>MARK_OCCURRENCES:B<|)|(A&C) DNF = C; // enum
+define("B", new |>MARK_OCCURRENCES:B<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02n.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02n.occurrences
new file mode 100644
index 0000000..41e3c9a
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_02n.occurrences
@@ -0,0 +1,14 @@
+class |>MARK_OCCURRENCES:B<| extends A {}
+    private const A||>MARK_OCCURRENCES:B<| UNION = A;
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B;
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C;
+    public const A||>MARK_OCCURRENCES:B<| UNION = A; // interface
+    public const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // interface
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C; // interface
+    private const A||>MARK_OCCURRENCES:B<| UNION = A; // trait
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // trait
+    public const (A&|>MARK_OCCURRENCES:B<|)|C DNF = C; // trait
+    private const A||>MARK_OCCURRENCES:B<| UNION = A; // enum
+    protected const A&|>MARK_OCCURRENCES:B<| INTERSECTION = B; // enum
+    public const (A&|>MARK_OCCURRENCES:B<|)|(A&C) DNF = C; // enum
+define("B", new ^|>MARK_OCCURRENCES:B<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_03a.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_03a.occurrences
new file mode 100644
index 0000000..06258bf
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_03a.occurrences
@@ -0,0 +1,6 @@
+class ^|>MARK_OCCURRENCES:C<| extends A {}
+    public const (A&B)||>MARK_OCCURRENCES:C<| DNF = C;
+    public const (A&B)||>MARK_OCCURRENCES:C<| DNF = C; // interface
+    public const (A&B)||>MARK_OCCURRENCES:C<| DNF = C; // trait
+    public const (A&B)|(A&|>MARK_OCCURRENCES:C<|) DNF = C; // enum
+define("C", new |>MARK_OCCURRENCES:C<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_03b.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_03b.occurrences
new file mode 100644
index 0000000..b098776
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_03b.occurrences
@@ -0,0 +1,6 @@
+class |>MARK_OCCURRENCES:C<| extends A {}
+    public const (A&B)|^|>MARK_OCCURRENCES:C<| DNF = C;
+    public const (A&B)||>MARK_OCCURRENCES:C<| DNF = C; // interface
+    public const (A&B)||>MARK_OCCURRENCES:C<| DNF = C; // trait
+    public const (A&B)|(A&|>MARK_OCCURRENCES:C<|) DNF = C; // enum
+define("C", new |>MARK_OCCURRENCES:C<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_03c.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_03c.occurrences
new file mode 100644
index 0000000..3476208
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_03c.occurrences
@@ -0,0 +1,6 @@
+class |>MARK_OCCURRENCES:C<| extends A {}
+    public const (A&B)||>MARK_OCCURRENCES:C<| DNF = C;
+    public const (A&B)|^|>MARK_OCCURRENCES:C<| DNF = C; // interface
+    public const (A&B)||>MARK_OCCURRENCES:C<| DNF = C; // trait
+    public const (A&B)|(A&|>MARK_OCCURRENCES:C<|) DNF = C; // enum
+define("C", new |>MARK_OCCURRENCES:C<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_03d.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_03d.occurrences
new file mode 100644
index 0000000..82eb9b8
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_03d.occurrences
@@ -0,0 +1,6 @@
+class |>MARK_OCCURRENCES:C<| extends A {}
+    public const (A&B)||>MARK_OCCURRENCES:C<| DNF = C;
+    public const (A&B)||>MARK_OCCURRENCES:C<| DNF = C; // interface
+    public const (A&B)|^|>MARK_OCCURRENCES:C<| DNF = C; // trait
+    public const (A&B)|(A&|>MARK_OCCURRENCES:C<|) DNF = C; // enum
+define("C", new |>MARK_OCCURRENCES:C<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_03e.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_03e.occurrences
new file mode 100644
index 0000000..b5724a9
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_03e.occurrences
@@ -0,0 +1,6 @@
+class |>MARK_OCCURRENCES:C<| extends A {}
+    public const (A&B)||>MARK_OCCURRENCES:C<| DNF = C;
+    public const (A&B)||>MARK_OCCURRENCES:C<| DNF = C; // interface
+    public const (A&B)||>MARK_OCCURRENCES:C<| DNF = C; // trait
+    public const (A&B)|(A&^|>MARK_OCCURRENCES:C<|) DNF = C; // enum
+define("C", new |>MARK_OCCURRENCES:C<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_03f.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_03f.occurrences
new file mode 100644
index 0000000..f32debb
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_03f.occurrences
@@ -0,0 +1,6 @@
+class |>MARK_OCCURRENCES:C<| extends A {}
+    public const (A&B)||>MARK_OCCURRENCES:C<| DNF = C;
+    public const (A&B)||>MARK_OCCURRENCES:C<| DNF = C; // interface
+    public const (A&B)||>MARK_OCCURRENCES:C<| DNF = C; // trait
+    public const (A&B)|(A&|>MARK_OCCURRENCES:C<|) DNF = C; // enum
+define("C", new ^|>MARK_OCCURRENCES:C<|());
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04a.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04a.occurrences
new file mode 100644
index 0000000..71cd1a8
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04a.occurrences
@@ -0,0 +1,16 @@
+class |>MARK_OCCURRENCES:Class^Test<| {
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::WITHOUT_TYPE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::NULLABLE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::INTERSECTION);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::DNF);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::STRING);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::INT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::FLOAT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::BOOL);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::ARRAY);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::ITERABLE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::MIXED);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::OBJECT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION2);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION3);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04b.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04b.occurrences
new file mode 100644
index 0000000..3eacd2f
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04b.occurrences
@@ -0,0 +1,16 @@
+class |>MARK_OCCURRENCES:ClassTest<| {
+var_dump(|>MARK_OCCURRENCES:Class^Test<|::WITHOUT_TYPE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::NULLABLE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::INTERSECTION);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::DNF);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::STRING);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::INT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::FLOAT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::BOOL);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::ARRAY);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::ITERABLE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::MIXED);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::OBJECT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION2);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION3);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04c.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04c.occurrences
new file mode 100644
index 0000000..7741c2e
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04c.occurrences
@@ -0,0 +1,16 @@
+class |>MARK_OCCURRENCES:ClassTest<| {
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::WITHOUT_TYPE);
+var_dump(|>MARK_OCCURRENCES:Clas^sTest<|::NULLABLE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::INTERSECTION);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::DNF);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::STRING);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::INT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::FLOAT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::BOOL);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::ARRAY);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::ITERABLE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::MIXED);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::OBJECT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION2);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION3);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04d.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04d.occurrences
new file mode 100644
index 0000000..83327f3
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04d.occurrences
@@ -0,0 +1,16 @@
+class |>MARK_OCCURRENCES:ClassTest<| {
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::WITHOUT_TYPE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::NULLABLE);
+var_dump(|>MARK_OCCURRENCES:Cla^ssTest<|::UNION);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::INTERSECTION);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::DNF);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::STRING);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::INT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::FLOAT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::BOOL);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::ARRAY);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::ITERABLE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::MIXED);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::OBJECT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION2);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION3);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04e.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04e.occurrences
new file mode 100644
index 0000000..d1107c2
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04e.occurrences
@@ -0,0 +1,16 @@
+class |>MARK_OCCURRENCES:ClassTest<| {
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::WITHOUT_TYPE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::NULLABLE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION);
+var_dump(|>MARK_OCCURRENCES:Class^Test<|::INTERSECTION);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::DNF);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::STRING);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::INT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::FLOAT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::BOOL);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::ARRAY);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::ITERABLE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::MIXED);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::OBJECT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION2);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION3);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04f.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04f.occurrences
new file mode 100644
index 0000000..2e3101f
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04f.occurrences
@@ -0,0 +1,16 @@
+class |>MARK_OCCURRENCES:ClassTest<| {
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::WITHOUT_TYPE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::NULLABLE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::INTERSECTION);
+var_dump(|>MARK_OCCURRENCES:ClassTes^t<|::DNF);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::STRING);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::INT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::FLOAT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::BOOL);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::ARRAY);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::ITERABLE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::MIXED);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::OBJECT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION2);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION3);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04g.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04g.occurrences
new file mode 100644
index 0000000..934c20ca
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04g.occurrences
@@ -0,0 +1,16 @@
+class |>MARK_OCCURRENCES:ClassTest<| {
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::WITHOUT_TYPE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::NULLABLE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::INTERSECTION);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::DNF);
+var_dump(|>MARK_OCCURRENCES:C^lassTest<|::STRING);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::INT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::FLOAT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::BOOL);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::ARRAY);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::ITERABLE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::MIXED);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::OBJECT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION2);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION3);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04h.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04h.occurrences
new file mode 100644
index 0000000..bd67f0a
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04h.occurrences
@@ -0,0 +1,16 @@
+class |>MARK_OCCURRENCES:ClassTest<| {
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::WITHOUT_TYPE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::NULLABLE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::INTERSECTION);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::DNF);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::STRING);
+var_dump(|>MARK_OCCURRENCES:Class^Test<|::INT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::FLOAT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::BOOL);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::ARRAY);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::ITERABLE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::MIXED);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::OBJECT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION2);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION3);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04i.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04i.occurrences
new file mode 100644
index 0000000..ebab223
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04i.occurrences
@@ -0,0 +1,16 @@
+class |>MARK_OCCURRENCES:ClassTest<| {
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::WITHOUT_TYPE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::NULLABLE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::INTERSECTION);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::DNF);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::STRING);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::INT);
+var_dump(|>MARK_OCCURRENCES:Clas^sTest<|::FLOAT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::BOOL);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::ARRAY);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::ITERABLE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::MIXED);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::OBJECT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION2);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION3);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04j.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04j.occurrences
new file mode 100644
index 0000000..a0099cb
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04j.occurrences
@@ -0,0 +1,16 @@
+class |>MARK_OCCURRENCES:ClassTest<| {
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::WITHOUT_TYPE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::NULLABLE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::INTERSECTION);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::DNF);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::STRING);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::INT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::FLOAT);
+var_dump(|>MARK_OCCURRENCES:Cla^ssTest<|::BOOL);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::ARRAY);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::ITERABLE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::MIXED);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::OBJECT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION2);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION3);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04k.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04k.occurrences
new file mode 100644
index 0000000..b568eda
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04k.occurrences
@@ -0,0 +1,16 @@
+class |>MARK_OCCURRENCES:ClassTest<| {
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::WITHOUT_TYPE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::NULLABLE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::INTERSECTION);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::DNF);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::STRING);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::INT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::FLOAT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::BOOL);
+var_dump(|>MARK_OCCURRENCES:Cla^ssTest<|::ARRAY);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::ITERABLE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::MIXED);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::OBJECT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION2);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION3);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04l.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04l.occurrences
new file mode 100644
index 0000000..4de9207
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04l.occurrences
@@ -0,0 +1,16 @@
+class |>MARK_OCCURRENCES:ClassTest<| {
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::WITHOUT_TYPE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::NULLABLE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::INTERSECTION);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::DNF);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::STRING);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::INT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::FLOAT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::BOOL);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::ARRAY);
+var_dump(|>MARK_OCCURRENCES:Cla^ssTest<|::ITERABLE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::MIXED);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::OBJECT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION2);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION3);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04m.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04m.occurrences
new file mode 100644
index 0000000..94d1fb5
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04m.occurrences
@@ -0,0 +1,16 @@
+class |>MARK_OCCURRENCES:ClassTest<| {
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::WITHOUT_TYPE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::NULLABLE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::INTERSECTION);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::DNF);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::STRING);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::INT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::FLOAT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::BOOL);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::ARRAY);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::ITERABLE);
+var_dump(|>MARK_OCCURRENCES:Clas^sTest<|::MIXED);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::OBJECT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION2);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION3);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04n.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04n.occurrences
new file mode 100644
index 0000000..84700fc
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04n.occurrences
@@ -0,0 +1,16 @@
+class |>MARK_OCCURRENCES:ClassTest<| {
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::WITHOUT_TYPE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::NULLABLE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::INTERSECTION);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::DNF);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::STRING);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::INT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::FLOAT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::BOOL);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::ARRAY);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::ITERABLE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::MIXED);
+var_dump(|>MARK_OCCURRENCES:Clas^sTest<|::OBJECT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION2);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION3);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04o.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04o.occurrences
new file mode 100644
index 0000000..21f0427
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04o.occurrences
@@ -0,0 +1,16 @@
+class |>MARK_OCCURRENCES:ClassTest<| {
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::WITHOUT_TYPE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::NULLABLE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::INTERSECTION);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::DNF);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::STRING);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::INT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::FLOAT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::BOOL);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::ARRAY);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::ITERABLE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::MIXED);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::OBJECT);
+var_dump(|>MARK_OCCURRENCES:Cla^ssTest<|::UNION2);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION3);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04p.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04p.occurrences
new file mode 100644
index 0000000..b652fd8
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_04p.occurrences
@@ -0,0 +1,16 @@
+class |>MARK_OCCURRENCES:ClassTest<| {
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::WITHOUT_TYPE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::NULLABLE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::INTERSECTION);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::DNF);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::STRING);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::INT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::FLOAT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::BOOL);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::ARRAY);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::ITERABLE);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::MIXED);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::OBJECT);
+var_dump(|>MARK_OCCURRENCES:ClassTest<|::UNION2);
+var_dump(|>MARK_OCCURRENCES:ClassTe^st<|::UNION3);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_05a.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_05a.occurrences
new file mode 100644
index 0000000..6a0c141
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_05a.occurrences
@@ -0,0 +1,2 @@
+    public const string|array UNION2 = 'a' . |>MARK_OCCURRENCES:Inter^faceTest<|::STRING;
+interface |>MARK_OCCURRENCES:InterfaceTest<| {
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_05b.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_05b.occurrences
new file mode 100644
index 0000000..b75de3c
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_05b.occurrences
@@ -0,0 +1,2 @@
+    public const string|array UNION2 = 'a' . |>MARK_OCCURRENCES:InterfaceTest<|::STRING;
+interface |>MARK_OCCURRENCES:Interf^aceTest<| {
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_06a.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_06a.occurrences
new file mode 100644
index 0000000..5198a36
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_06a.occurrences
@@ -0,0 +1,2 @@
+enum |>MARK_OCCURRENCES:EnumT^est<| {
+    public const static A = |>MARK_OCCURRENCES:EnumTest<|::Test; // enum
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_06b.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_06b.occurrences
new file mode 100644
index 0000000..b739410
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_06b.occurrences
@@ -0,0 +1,2 @@
+enum |>MARK_OCCURRENCES:EnumTest<| {
+    public const static A = |>MARK_OCCURRENCES:Enum^Test<|::Test; // enum
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_07a.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_07a.occurrences
new file mode 100644
index 0000000..35cc735
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_07a.occurrences
@@ -0,0 +1,3 @@
+    public const |>MARK_OCCURRENCES:WITHOUT^_TYPE<| = 1;
+    public const mixed MIXED = 1 + self::|>MARK_OCCURRENCES:WITHOUT_TYPE<|;
+var_dump(ClassTest::|>MARK_OCCURRENCES:WITHOUT_TYPE<|);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_07b.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_07b.occurrences
new file mode 100644
index 0000000..ec95edf
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_07b.occurrences
@@ -0,0 +1,3 @@
+    public const |>MARK_OCCURRENCES:WITHOUT_TYPE<| = 1;
+    public const mixed MIXED = 1 + self::|>MARK_OCCURRENCES:WITHOUT_^TYPE<|;
+var_dump(ClassTest::|>MARK_OCCURRENCES:WITHOUT_TYPE<|);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_07c.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_07c.occurrences
new file mode 100644
index 0000000..f051235
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_07c.occurrences
@@ -0,0 +1,3 @@
+    public const |>MARK_OCCURRENCES:WITHOUT_TYPE<| = 1;
+    public const mixed MIXED = 1 + self::|>MARK_OCCURRENCES:WITHOUT_TYPE<|;
+var_dump(ClassTest::|>MARK_OCCURRENCES:WITH^OUT_TYPE<|);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_08a.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_08a.occurrences
new file mode 100644
index 0000000..27e3e44
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_08a.occurrences
@@ -0,0 +1,2 @@
+    public const ?A |>MARK_OCCURRENCES:NULLA^BLE<| = null;
+var_dump(ClassTest::|>MARK_OCCURRENCES:NULLABLE<|);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_08b.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_08b.occurrences
new file mode 100644
index 0000000..5a0e904
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_08b.occurrences
@@ -0,0 +1,2 @@
+    public const ?A |>MARK_OCCURRENCES:NULLABLE<| = null;
+var_dump(ClassTest::|>MARK_OCCURRENCES:NUL^LABLE<|);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_09a.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_09a.occurrences
new file mode 100644
index 0000000..24a8d88
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_09a.occurrences
@@ -0,0 +1,2 @@
+    private const A|B |>MARK_OCCURRENCES:UNI^ON<| = A;
+var_dump(ClassTest::|>MARK_OCCURRENCES:UNION<|);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_09b.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_09b.occurrences
new file mode 100644
index 0000000..4df13b3
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_09b.occurrences
@@ -0,0 +1,2 @@
+    private const A|B |>MARK_OCCURRENCES:UNION<| = A;
+var_dump(ClassTest::|>MARK_OCCURRENCES:UN^ION<|);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_10a.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_10a.occurrences
new file mode 100644
index 0000000..7380ac9
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_10a.occurrences
@@ -0,0 +1,2 @@
+    protected const A&B |>MARK_OCCURRENCES:INTER^SECTION<| = B;
+var_dump(ClassTest::|>MARK_OCCURRENCES:INTERSECTION<|);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_10b.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_10b.occurrences
new file mode 100644
index 0000000..94f32ef
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_10b.occurrences
@@ -0,0 +1,2 @@
+    protected const A&B |>MARK_OCCURRENCES:INTERSECTION<| = B;
+var_dump(ClassTest::|>MARK_OCCURRENCES:INTE^RSECTION<|);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_11a.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_11a.occurrences
new file mode 100644
index 0000000..8c1433d
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_11a.occurrences
@@ -0,0 +1,2 @@
+    public const (A&B)|C |>MARK_OCCURRENCES:D^NF<| = C;
+var_dump(ClassTest::|>MARK_OCCURRENCES:DNF<|);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_11b.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_11b.occurrences
new file mode 100644
index 0000000..36971e1
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_11b.occurrences
@@ -0,0 +1,2 @@
+    public const (A&B)|C |>MARK_OCCURRENCES:DNF<| = C;
+var_dump(ClassTest::|>MARK_OCCURRENCES:D^NF<|);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_12a.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_12a.occurrences
new file mode 100644
index 0000000..64b4174
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_12a.occurrences
@@ -0,0 +1,2 @@
+    public const string |>MARK_OCCURRENCES:STR^ING<| = 'a';
+var_dump(ClassTest::|>MARK_OCCURRENCES:STRING<|);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_12b.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_12b.occurrences
new file mode 100644
index 0000000..b2147ca
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_12b.occurrences
@@ -0,0 +1,2 @@
+    public const string |>MARK_OCCURRENCES:STRING<| = 'a';
+var_dump(ClassTest::|>MARK_OCCURRENCES:ST^RING<|);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_13a.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_13a.occurrences
new file mode 100644
index 0000000..b78676a
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_13a.occurrences
@@ -0,0 +1,2 @@
+    public const int |>MARK_OCCURRENCES:I^NT<| = 1;
+var_dump(ClassTest::|>MARK_OCCURRENCES:INT<|);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_13b.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_13b.occurrences
new file mode 100644
index 0000000..6747a53
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_13b.occurrences
@@ -0,0 +1,2 @@
+    public const int |>MARK_OCCURRENCES:INT<| = 1;
+var_dump(ClassTest::|>MARK_OCCURRENCES:I^NT<|);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_14a.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_14a.occurrences
new file mode 100644
index 0000000..4114a5b
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_14a.occurrences
@@ -0,0 +1,2 @@
+    public const float |>MARK_OCCURRENCES:FL^OAT<| = 1.5;
+var_dump(ClassTest::|>MARK_OCCURRENCES:FLOAT<|);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_14b.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_14b.occurrences
new file mode 100644
index 0000000..d7e1368
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_14b.occurrences
@@ -0,0 +1,2 @@
+    public const float |>MARK_OCCURRENCES:FLOAT<| = 1.5;
+var_dump(ClassTest::|>MARK_OCCURRENCES:FL^OAT<|);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_15a.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_15a.occurrences
new file mode 100644
index 0000000..4a1d241
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_15a.occurrences
@@ -0,0 +1,2 @@
+    public const bool |>MARK_OCCURRENCES:B^OOL<| = true;
+var_dump(ClassTest::|>MARK_OCCURRENCES:BOOL<|);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_15b.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_15b.occurrences
new file mode 100644
index 0000000..c196001
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_15b.occurrences
@@ -0,0 +1,2 @@
+    public const bool |>MARK_OCCURRENCES:BOOL<| = true;
+var_dump(ClassTest::|>MARK_OCCURRENCES:B^OOL<|);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_16a.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_16a.occurrences
new file mode 100644
index 0000000..69a2364
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_16a.occurrences
@@ -0,0 +1,2 @@
+    public const array |>MARK_OCCURRENCES:A^RRAY<| = ['t', 'e', 's', 't'];
+var_dump(ClassTest::|>MARK_OCCURRENCES:ARRAY<|);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_16b.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_16b.occurrences
new file mode 100644
index 0000000..bc01b8b
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_16b.occurrences
@@ -0,0 +1,2 @@
+    public const array |>MARK_OCCURRENCES:ARRAY<| = ['t', 'e', 's', 't'];
+var_dump(ClassTest::|>MARK_OCCURRENCES:AR^RAY<|);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_17a.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_17a.occurrences
new file mode 100644
index 0000000..e08112e
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_17a.occurrences
@@ -0,0 +1,2 @@
+    public const iterable |>MARK_OCCURRENCES:ITER^ABLE<| = ['a', 'b', 'c'];
+var_dump(ClassTest::|>MARK_OCCURRENCES:ITERABLE<|);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_17b.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_17b.occurrences
new file mode 100644
index 0000000..51becff
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_17b.occurrences
@@ -0,0 +1,2 @@
+    public const iterable |>MARK_OCCURRENCES:ITERABLE<| = ['a', 'b', 'c'];
+var_dump(ClassTest::|>MARK_OCCURRENCES:ITE^RABLE<|);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_18a.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_18a.occurrences
new file mode 100644
index 0000000..d6752a0
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_18a.occurrences
@@ -0,0 +1,2 @@
+    public const mixed |>MARK_OCCURRENCES:MIX^ED<| = 1 + self::WITHOUT_TYPE;
+var_dump(ClassTest::|>MARK_OCCURRENCES:MIXED<|);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_18b.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_18b.occurrences
new file mode 100644
index 0000000..62799e8
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_18b.occurrences
@@ -0,0 +1,2 @@
+    public const mixed |>MARK_OCCURRENCES:MIXED<| = 1 + self::WITHOUT_TYPE;
+var_dump(ClassTest::|>MARK_OCCURRENCES:MI^XED<|);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_19a.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_19a.occurrences
new file mode 100644
index 0000000..60ae703
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_19a.occurrences
@@ -0,0 +1,2 @@
+    public const object |>MARK_OCCURRENCES:OB^JECT<| = A;
+var_dump(ClassTest::|>MARK_OCCURRENCES:OBJECT<|);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_19b.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_19b.occurrences
new file mode 100644
index 0000000..8123d62
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_19b.occurrences
@@ -0,0 +1,2 @@
+    public const object |>MARK_OCCURRENCES:OBJECT<| = A;
+var_dump(ClassTest::|>MARK_OCCURRENCES:OBJ^ECT<|);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_20a.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_20a.occurrences
new file mode 100644
index 0000000..2b14043
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_20a.occurrences
@@ -0,0 +1,2 @@
+    public const string|array |>MARK_OCCURRENCES:UNI^ON2<| = 'a' . InterfaceTest::STRING;
+var_dump(ClassTest::|>MARK_OCCURRENCES:UNION2<|);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_20b.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_20b.occurrences
new file mode 100644
index 0000000..04ed4e4
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_20b.occurrences
@@ -0,0 +1,2 @@
+    public const string|array |>MARK_OCCURRENCES:UNION2<| = 'a' . InterfaceTest::STRING;
+var_dump(ClassTest::|>MARK_OCCURRENCES:UNIO^N2<|);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_21a.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_21a.occurrences
new file mode 100644
index 0000000..fca7d48
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_21a.occurrences
@@ -0,0 +1,2 @@
+    public const int|null |>MARK_OCCURRENCES:UNI^ON3<| = null;
+var_dump(ClassTest::|>MARK_OCCURRENCES:UNION3<|);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_21b.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_21b.occurrences
new file mode 100644
index 0000000..ec063c4
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_21b.occurrences
@@ -0,0 +1,2 @@
+    public const int|null |>MARK_OCCURRENCES:UNION3<| = null;
+var_dump(ClassTest::|>MARK_OCCURRENCES:UNIO^N3<|);
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_22a.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_22a.occurrences
new file mode 100644
index 0000000..bb9cef7
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_22a.occurrences
@@ -0,0 +1,2 @@
+    public const string|array UNION2 = 'a' . InterfaceTest::|>MARK_OCCURRENCES:STR^ING<|;
+    const string |>MARK_OCCURRENCES:STRING<| = "string"; // interface
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_22b.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_22b.occurrences
new file mode 100644
index 0000000..2d910fc
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_22b.occurrences
@@ -0,0 +1,2 @@
+    public const string|array UNION2 = 'a' . InterfaceTest::|>MARK_OCCURRENCES:STRING<|;
+    const string |>MARK_OCCURRENCES:STR^ING<| = "string"; // interface
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_23a.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_23a.occurrences
new file mode 100644
index 0000000..f3f33fc
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_23a.occurrences
@@ -0,0 +1,2 @@
+    public const static A = EnumTest::|>MARK_OCCURRENCES:Tes^t<|; // enum
+    case |>MARK_OCCURRENCES:Test<|;
diff --git a/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_23b.occurrences b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_23b.occurrences
new file mode 100644
index 0000000..1866542
--- /dev/null
+++ b/php/php.editor/test/unit/data/testfiles/markoccurences/php83/testTypedClassConstants/testTypedClassConstants.php.testTypedClassConstants_23b.occurrences
@@ -0,0 +1,2 @@
+    public const static A = EnumTest::|>MARK_OCCURRENCES:Test<|; // enum
+    case |>MARK_OCCURRENCES:T^est<|;
diff --git a/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/csl/GotoDeclarationPHP83Test.java b/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/csl/GotoDeclarationPHP83Test.java
index 26ec278..69c6051 100644
--- a/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/csl/GotoDeclarationPHP83Test.java
+++ b/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/csl/GotoDeclarationPHP83Test.java
@@ -100,4 +100,276 @@
     public void testDynamicClassConstantFetch_10a() throws Exception {
         checkDeclaration(getTestPath(), "EnumT^est::{[]};", "enum ^EnumTest: string {");
     }
+
+    public void testTypedClassConstants_01a() throws Exception {
+        checkDeclaration(getTestPath(), "    public const ?^A NULLABLE = null;", "class ^A implements Stringable {");
+    }
+
+    public void testTypedClassConstants_01b() throws Exception {
+        checkDeclaration(getTestPath(), "    private const ^A|B UNION = A;", "class ^A implements Stringable {");
+    }
+
+    public void testTypedClassConstants_01c() throws Exception {
+        checkDeclaration(getTestPath(), "    protected const ^A&B INTERSECTION = B;", "class ^A implements Stringable {");
+    }
+
+    public void testTypedClassConstants_01d() throws Exception {
+        checkDeclaration(getTestPath(), "    public const (^A&B)|C DNF = C;", "class ^A implements Stringable {");
+    }
+
+    public void testTypedClassConstants_01e() throws Exception {
+        checkDeclaration(getTestPath(), "    public const ^A|B UNION = A; // interface", "class ^A implements Stringable {");
+    }
+
+    public void testTypedClassConstants_01f() throws Exception {
+        checkDeclaration(getTestPath(), "    public const ^A&B INTERSECTION = B; // interface", "class ^A implements Stringable {");
+    }
+
+    public void testTypedClassConstants_01g() throws Exception {
+        checkDeclaration(getTestPath(), "    public const (^A&B)|C DNF = C; // interface", "class ^A implements Stringable {");
+    }
+
+    public void testTypedClassConstants_01h() throws Exception {
+        checkDeclaration(getTestPath(), "    private const ^A|B UNION = A; // trait", "class ^A implements Stringable {");
+    }
+
+    public void testTypedClassConstants_01i() throws Exception {
+        checkDeclaration(getTestPath(), "    protected const ^A&B INTERSECTION = B; // trait", "class ^A implements Stringable {");
+    }
+
+    public void testTypedClassConstants_01j() throws Exception {
+        checkDeclaration(getTestPath(), "    public const (^A&B)|C DNF = C; // trait", "class ^A implements Stringable {");
+    }
+
+    public void testTypedClassConstants_01k() throws Exception {
+        checkDeclaration(getTestPath(), "    private const ^A|B UNION = A; // enum", "class ^A implements Stringable {");
+    }
+
+    public void testTypedClassConstants_01l() throws Exception {
+        checkDeclaration(getTestPath(), "    protected const ^A&B INTERSECTION = B; // enum", "class ^A implements Stringable {");
+    }
+
+    public void testTypedClassConstants_01m() throws Exception {
+        checkDeclaration(getTestPath(), "    public const (^A&B)|(A&C) DNF = C; // enum", "class ^A implements Stringable {");
+    }
+
+    public void testTypedClassConstants_01o() throws Exception {
+        checkDeclaration(getTestPath(), "    public const (A&B)|(^A&C) DNF = C; // enum", "class ^A implements Stringable {");
+    }
+
+    public void testTypedClassConstants_01p() throws Exception {
+        checkDeclaration(getTestPath(), "define(\"A\", new ^A());", "class ^A implements Stringable {");
+    }
+
+    public void testTypedClassConstants_02a() throws Exception {
+        checkDeclaration(getTestPath(), "    private const A|^B UNION = A;", "class ^B extends A {}");
+    }
+
+    public void testTypedClassConstants_02b() throws Exception {
+        checkDeclaration(getTestPath(), "    protected const A&^B INTERSECTION = B;", "class ^B extends A {}");
+    }
+
+    public void testTypedClassConstants_02c() throws Exception {
+        checkDeclaration(getTestPath(), "    public const (A&^B)|C DNF = C;", "class ^B extends A {}");
+    }
+
+    public void testTypedClassConstants_02d() throws Exception {
+        checkDeclaration(getTestPath(), "    public const A|^B UNION = A; // interface", "class ^B extends A {}");
+    }
+
+    public void testTypedClassConstants_02e() throws Exception {
+        checkDeclaration(getTestPath(), "    public const A&^B INTERSECTION = B; // interface", "class ^B extends A {}");
+    }
+
+    public void testTypedClassConstants_02f() throws Exception {
+        checkDeclaration(getTestPath(), "    public const (A&^B)|C DNF = C; // interface", "class ^B extends A {}");
+    }
+
+    public void testTypedClassConstants_02g() throws Exception {
+        checkDeclaration(getTestPath(), "    private const A|^B UNION = A; // trait", "class ^B extends A {}");
+    }
+
+    public void testTypedClassConstants_02h() throws Exception {
+        checkDeclaration(getTestPath(), "    protected const A&^B INTERSECTION = B; // trait", "class ^B extends A {}");
+    }
+
+    public void testTypedClassConstants_02i() throws Exception {
+        checkDeclaration(getTestPath(), "    public const (A&^B)|C DNF = C; // trait", "class ^B extends A {}");
+    }
+
+    public void testTypedClassConstants_02j() throws Exception {
+        checkDeclaration(getTestPath(), "    private const A|^B UNION = A; // enum", "class ^B extends A {}");
+    }
+
+    public void testTypedClassConstants_02k() throws Exception {
+        checkDeclaration(getTestPath(), "    protected const A&^B INTERSECTION = B; // enum", "class ^B extends A {}");
+    }
+
+    public void testTypedClassConstants_02l() throws Exception {
+        checkDeclaration(getTestPath(), "    public const (A&^B)|(A&C) DNF = C; // enum", "class ^B extends A {}");
+    }
+
+    public void testTypedClassConstants_02m() throws Exception {
+        checkDeclaration(getTestPath(), "define(\"B\", new ^B());", "class ^B extends A {}");
+    }
+
+    public void testTypedClassConstants_03a() throws Exception {
+        checkDeclaration(getTestPath(), "    public const (A&B)|^C DNF = C;", "class ^C extends A {}");
+    }
+
+    public void testTypedClassConstants_03b() throws Exception {
+        checkDeclaration(getTestPath(), "    public const (A&B)|^C DNF = C; // interface", "class ^C extends A {}");
+    }
+
+    public void testTypedClassConstants_03c() throws Exception {
+        checkDeclaration(getTestPath(), "    public const (A&B)|^C DNF = C; // trait", "class ^C extends A {}");
+    }
+
+    public void testTypedClassConstants_03d() throws Exception {
+        checkDeclaration(getTestPath(), "    public const (A&B)|(A&^C) DNF = C; // enum", "class ^C extends A {}");
+    }
+
+    public void testTypedClassConstants_03e() throws Exception {
+        checkDeclaration(getTestPath(), "define(\"C\", new ^C());", "class ^C extends A {}");
+    }
+
+    public void testTypedClassConstants_04a() throws Exception {
+        checkDeclaration(getTestPath(), "    private const A|B UNION = ^A;", "define(\"^A\", new A());");
+    }
+
+    public void testTypedClassConstants_04b() throws Exception {
+        checkDeclaration(getTestPath(), "    public const object OBJECT = ^A;", "define(\"^A\", new A());");
+    }
+
+    public void testTypedClassConstants_04c() throws Exception {
+        checkDeclaration(getTestPath(), "    public const A|B UNION = ^A; // interface", "define(\"^A\", new A());");
+    }
+
+    public void testTypedClassConstants_04d() throws Exception {
+        checkDeclaration(getTestPath(), "    private const A|B UNION = ^A; // trait", "define(\"^A\", new A());");
+    }
+
+    public void testTypedClassConstants_04e() throws Exception {
+        checkDeclaration(getTestPath(), "    private const A|B UNION = ^A; // enum", "define(\"^A\", new A());");
+    }
+
+    public void testTypedClassConstants_05a() throws Exception {
+        checkDeclaration(getTestPath(), "    protected const A&B INTERSECTION = ^B;", "define(\"^B\", new B());");
+    }
+
+    public void testTypedClassConstants_05b() throws Exception {
+        checkDeclaration(getTestPath(), "    public const A&B INTERSECTION = ^B; // interface", "define(\"^B\", new B());");
+    }
+
+    public void testTypedClassConstants_05c() throws Exception {
+        checkDeclaration(getTestPath(), "    protected const A&B INTERSECTION = ^B; // trait", "define(\"^B\", new B());");
+    }
+
+    public void testTypedClassConstants_05d() throws Exception {
+        checkDeclaration(getTestPath(), "    protected const A&B INTERSECTION = ^B; // enum", "define(\"^B\", new B());");
+    }
+
+    public void testTypedClassConstants_06a() throws Exception {
+        checkDeclaration(getTestPath(), "    public const (A&B)|C DNF = ^C;", "define(\"^C\", new C());");
+    }
+
+    public void testTypedClassConstants_06b() throws Exception {
+        checkDeclaration(getTestPath(), "    public const (A&B)|C DNF = ^C; // interface", "define(\"^C\", new C());");
+    }
+
+    public void testTypedClassConstants_06c() throws Exception {
+        checkDeclaration(getTestPath(), "    public const (A&B)|C DNF = ^C; // trait", "define(\"^C\", new C());");
+    }
+
+    public void testTypedClassConstants_06d() throws Exception {
+        checkDeclaration(getTestPath(), "    public const (A&B)|(A&C) DNF = ^C; // enum", "define(\"^C\", new C());");
+    }
+
+    public void testTypedClassConstants_07a() throws Exception {
+        checkDeclaration(getTestPath(), "    public const mixed MIXED = 1 + self::WITH^OUT_TYPE;", "    public const ^WITHOUT_TYPE = 1;");
+    }
+
+    public void testTypedClassConstants_07b() throws Exception {
+        checkDeclaration(getTestPath(), "var_dump(ClassTest::WITHOUT_T^YPE);", "    public const ^WITHOUT_TYPE = 1;");
+    }
+
+    public void testTypedClassConstants_08a() throws Exception {
+        checkDeclaration(getTestPath(), "var_dump(ClassTest::NULLAB^LE);", "    public const ?A ^NULLABLE = null;");
+    }
+
+    public void testTypedClassConstants_09a() throws Exception {
+        checkDeclaration(getTestPath(), "var_dump(ClassTest::UNI^ON);", "    private const A|B ^UNION = A;");
+    }
+
+    public void testTypedClassConstants_10a() throws Exception {
+        checkDeclaration(getTestPath(), "var_dump(ClassTest::INTERSECTI^ON);", "    protected const A&B ^INTERSECTION = B;");
+    }
+
+    public void testTypedClassConstants_11a() throws Exception {
+        checkDeclaration(getTestPath(), "var_dump(ClassTest::DN^F);", "    public const (A&B)|C ^DNF = C;");
+    }
+
+    public void testTypedClassConstants_12a() throws Exception {
+        checkDeclaration(getTestPath(), "var_dump(ClassTest::STRIN^G);", "    public const string ^STRING = 'a';");
+    }
+
+    public void testTypedClassConstants_13a() throws Exception {
+        checkDeclaration(getTestPath(), "var_dump(ClassTest::IN^T);", "    public const int ^INT = 1;");
+    }
+
+    public void testTypedClassConstants_14a() throws Exception {
+        checkDeclaration(getTestPath(), "var_dump(ClassTest::FLOA^T);", "    public const float ^FLOAT = 1.5;");
+    }
+
+    public void testTypedClassConstants_15a() throws Exception {
+        checkDeclaration(getTestPath(), "var_dump(ClassTest::BO^OL);", "    public const bool ^BOOL = true;");
+    }
+
+    public void testTypedClassConstants_16a() throws Exception {
+        checkDeclaration(getTestPath(), "var_dump(ClassTest::ARRA^Y);", "    public const array ^ARRAY = ['t', 'e', 's', 't'];");
+    }
+
+    public void testTypedClassConstants_17a() throws Exception {
+        checkDeclaration(getTestPath(), "var_dump(ClassTest::ITERAB^LE);", "    public const iterable ^ITERABLE = ['a', 'b', 'c'];");
+    }
+
+    public void testTypedClassConstants_18a() throws Exception {
+        checkDeclaration(getTestPath(), "var_dump(ClassTest::MIX^ED);", "    public const mixed ^MIXED = 1 + self::WITHOUT_TYPE;");
+    }
+
+    public void testTypedClassConstants_19a() throws Exception {
+        checkDeclaration(getTestPath(), "var_dump(ClassTest::OB^JECT);", "    public const object ^OBJECT = A;");
+    }
+
+    public void testTypedClassConstants_20a() throws Exception {
+        checkDeclaration(getTestPath(), "var_dump(ClassTest::UNIO^N2);", "    public const string|array ^UNION2 = 'a' . InterfaceTest::STRING;");
+    }
+
+    public void testTypedClassConstants_21a() throws Exception {
+        checkDeclaration(getTestPath(), "var_dump(ClassTest::UNIO^N3);", "    public const int|null ^UNION3 = null;");
+    }
+
+    public void testTypedClassConstants_22a() throws Exception {
+        checkDeclaration(getTestPath(), "    public const string|array UNION2 = 'a' . InterfaceTest::ST^RING;", "    const string ^STRING = \"string\"; // interface");
+    }
+
+    public void testTypedClassConstants_23a() throws Exception {
+        checkDeclaration(getTestPath(), "    public const static A = EnumTest::Te^st; // enum", "    case ^Test;");
+    }
+
+    public void testTypedClassConstants_24a() throws Exception {
+        checkDeclaration(getTestPath(), "var_dump(Class^Test::WITHOUT_TYPE);", "class ^ClassTest {");
+    }
+
+    public void testTypedClassConstants_25a() throws Exception {
+        checkDeclaration(getTestPath(), "    public const string|array UNION2 = 'a' . InterfaceT^est::STRING;", "interface ^InterfaceTest {");
+    }
+
+    public void testTypedClassConstants_26a() throws Exception {
+        checkDeclaration(getTestPath(), "    public const static A = EnumT^est::Test; // enum", "enum ^EnumTest {");
+    }
+
+    public void testTypedClassConstants_01() throws Exception {
+//        checkDeclaration(getTestPath(), "", "");
+    }
 }
diff --git a/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/csl/OccurrencesFinderImplPHP83Test.java b/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/csl/OccurrencesFinderImplPHP83Test.java
index 8a8b9f0..1ae59db 100644
--- a/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/csl/OccurrencesFinderImplPHP83Test.java
+++ b/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/csl/OccurrencesFinderImplPHP83Test.java
@@ -216,4 +216,376 @@
     public void testDynamicClassConstantFetch_11j() throws Exception {
         checkOccurrences(getTestPath(), "$tes^t = new Test();", true);
     }
+
+    public void testTypedClassConstants_01a() throws Exception {
+        checkOccurrences(getTestPath(), "class ^A implements Stringable {", true);
+    }
+
+    public void testTypedClassConstants_01b() throws Exception {
+        checkOccurrences(getTestPath(), "class B extends ^A {}", true);
+    }
+
+    public void testTypedClassConstants_01c() throws Exception {
+        checkOccurrences(getTestPath(), "class C extends ^A {}", true);
+    }
+
+    public void testTypedClassConstants_01d() throws Exception {
+        checkOccurrences(getTestPath(), "    public const ?^A NULLABLE = null;", true);
+    }
+
+    public void testTypedClassConstants_01e() throws Exception {
+        checkOccurrences(getTestPath(), "    private const ^A|B UNION = A;", true);
+    }
+
+    public void testTypedClassConstants_01f() throws Exception {
+        checkOccurrences(getTestPath(), "    protected const ^A&B INTERSECTION = B;", true);
+    }
+
+    public void testTypedClassConstants_01g() throws Exception {
+        checkOccurrences(getTestPath(), "    public const (^A&B)|C DNF = C;", true);
+    }
+
+    public void testTypedClassConstants_01h() throws Exception {
+        checkOccurrences(getTestPath(), "    public const ^A|B UNION = A; // interface", true);
+    }
+
+    public void testTypedClassConstants_01i() throws Exception {
+        checkOccurrences(getTestPath(), "    public const ^A&B INTERSECTION = B; // interface", true);
+    }
+
+    public void testTypedClassConstants_01j() throws Exception {
+        checkOccurrences(getTestPath(), "    public const (^A&B)|C DNF = C; // interface", true);
+    }
+
+    public void testTypedClassConstants_01k() throws Exception {
+        checkOccurrences(getTestPath(), "    private const ^A|B UNION = A; // trait", true);
+    }
+
+    public void testTypedClassConstants_01l() throws Exception {
+        checkOccurrences(getTestPath(), "    protected const ^A&B INTERSECTION = B; // trait", true);
+    }
+
+    public void testTypedClassConstants_01m() throws Exception {
+        checkOccurrences(getTestPath(), "    public const (^A&B)|C DNF = C; // trait", true);
+    }
+
+    public void testTypedClassConstants_01n() throws Exception {
+        checkOccurrences(getTestPath(), "    private const ^A|B UNION = A; // enum", true);
+    }
+
+    public void testTypedClassConstants_01o() throws Exception {
+        checkOccurrences(getTestPath(), "    protected const ^A&B INTERSECTION = B; // enum", true);
+    }
+
+    public void testTypedClassConstants_01p() throws Exception {
+        checkOccurrences(getTestPath(), "    public const (^A&B)|(A&C) DNF = C; // enum", true);
+    }
+
+    public void testTypedClassConstants_01q() throws Exception {
+        checkOccurrences(getTestPath(), "    public const (A&B)|(^A&C) DNF = C; // enum", true);
+    }
+
+    public void testTypedClassConstants_01r() throws Exception {
+        checkOccurrences(getTestPath(), "define(\"A\", new ^A());", true);
+    }
+
+    public void testTypedClassConstants_02a() throws Exception {
+        checkOccurrences(getTestPath(), "class ^B extends A {}", true);
+    }
+
+    public void testTypedClassConstants_02b() throws Exception {
+        checkOccurrences(getTestPath(), "    private const A|^B UNION = A;", true);
+    }
+
+    public void testTypedClassConstants_02c() throws Exception {
+        checkOccurrences(getTestPath(), "    protected const A&^B INTERSECTION = B;", true);
+    }
+
+    public void testTypedClassConstants_02d() throws Exception {
+        checkOccurrences(getTestPath(), "    public const (A&^B)|C DNF = C;", true);
+    }
+
+    public void testTypedClassConstants_02e() throws Exception {
+        checkOccurrences(getTestPath(), "    public const A|^B UNION = A; // interface", true);
+    }
+
+    public void testTypedClassConstants_02f() throws Exception {
+        checkOccurrences(getTestPath(), "    public const A&^B INTERSECTION = B; // interface", true);
+    }
+
+    public void testTypedClassConstants_02g() throws Exception {
+        checkOccurrences(getTestPath(), "    public const (A&^B)|C DNF = C; // interface", true);
+    }
+
+    public void testTypedClassConstants_02h() throws Exception {
+        checkOccurrences(getTestPath(), "    private const A|^B UNION = A; // trait", true);
+    }
+
+    public void testTypedClassConstants_02i() throws Exception {
+        checkOccurrences(getTestPath(), "    protected const A&^B INTERSECTION = B; // trait", true);
+    }
+
+    public void testTypedClassConstants_02j() throws Exception {
+        checkOccurrences(getTestPath(), "    public const (A&^B)|C DNF = C; // trait", true);
+    }
+
+    public void testTypedClassConstants_02k() throws Exception {
+        checkOccurrences(getTestPath(), "    private const A|^B UNION = A; // enum", true);
+    }
+
+    public void testTypedClassConstants_02l() throws Exception {
+        checkOccurrences(getTestPath(), "    protected const A&^B INTERSECTION = B; // enum", true);
+    }
+
+    public void testTypedClassConstants_02m() throws Exception {
+        checkOccurrences(getTestPath(), "    public const (A&^B)|(A&C) DNF = C; // enum", true);
+    }
+
+    public void testTypedClassConstants_02n() throws Exception {
+        checkOccurrences(getTestPath(), "define(\"B\", new ^B());", true);
+    }
+
+    public void testTypedClassConstants_03a() throws Exception {
+        checkOccurrences(getTestPath(), "class ^C extends A {}", true);
+    }
+
+    public void testTypedClassConstants_03b() throws Exception {
+        checkOccurrences(getTestPath(), "    public const (A&B)|^C DNF = C;", true);
+    }
+
+    public void testTypedClassConstants_03c() throws Exception {
+        checkOccurrences(getTestPath(), "    public const (A&B)|^C DNF = C; // interface", true);
+    }
+
+    public void testTypedClassConstants_03d() throws Exception {
+        checkOccurrences(getTestPath(), "    public const (A&B)|^C DNF = C; // trait", true);
+    }
+
+    public void testTypedClassConstants_03e() throws Exception {
+        checkOccurrences(getTestPath(), "    public const (A&B)|(A&^C) DNF = C; // enum", true);
+    }
+
+    public void testTypedClassConstants_03f() throws Exception {
+        checkOccurrences(getTestPath(), "define(\"C\", new ^C());", true);
+    }
+
+    public void testTypedClassConstants_04a() throws Exception {
+        checkOccurrences(getTestPath(), "class Class^Test {", true);
+    }
+
+    public void testTypedClassConstants_04b() throws Exception {
+        checkOccurrences(getTestPath(), "var_dump(Class^Test::WITHOUT_TYPE);", true);
+    }
+
+    public void testTypedClassConstants_04c() throws Exception {
+        checkOccurrences(getTestPath(), "var_dump(Clas^sTest::NULLABLE);", true);
+    }
+
+    public void testTypedClassConstants_04d() throws Exception {
+        checkOccurrences(getTestPath(), "var_dump(Cla^ssTest::UNION);", true);
+    }
+
+    public void testTypedClassConstants_04e() throws Exception {
+        checkOccurrences(getTestPath(), "var_dump(Class^Test::INTERSECTION);", true);
+    }
+
+    public void testTypedClassConstants_04f() throws Exception {
+        checkOccurrences(getTestPath(), "var_dump(ClassTes^t::DNF);", true);
+    }
+
+    public void testTypedClassConstants_04g() throws Exception {
+        checkOccurrences(getTestPath(), "var_dump(C^lassTest::STRING);", true);
+    }
+
+    public void testTypedClassConstants_04h() throws Exception {
+        checkOccurrences(getTestPath(), "var_dump(Class^Test::INT);", true);
+    }
+
+    public void testTypedClassConstants_04i() throws Exception {
+        checkOccurrences(getTestPath(), "var_dump(Clas^sTest::FLOAT);", true);
+    }
+
+    public void testTypedClassConstants_04j() throws Exception {
+        checkOccurrences(getTestPath(), "var_dump(Cla^ssTest::BOOL);", true);
+    }
+
+    public void testTypedClassConstants_04k() throws Exception {
+        checkOccurrences(getTestPath(), "var_dump(Cla^ssTest::ARRAY);", true);
+    }
+
+    public void testTypedClassConstants_04l() throws Exception {
+        checkOccurrences(getTestPath(), "var_dump(Cla^ssTest::ITERABLE);", true);
+    }
+
+    public void testTypedClassConstants_04m() throws Exception {
+        checkOccurrences(getTestPath(), "var_dump(Clas^sTest::MIXED);", true);
+    }
+
+    public void testTypedClassConstants_04n() throws Exception {
+        checkOccurrences(getTestPath(), "var_dump(Clas^sTest::OBJECT);", true);
+    }
+
+    public void testTypedClassConstants_04o() throws Exception {
+        checkOccurrences(getTestPath(), "var_dump(Cla^ssTest::UNION2);", true);
+    }
+
+    public void testTypedClassConstants_04p() throws Exception {
+        checkOccurrences(getTestPath(), "var_dump(ClassTe^st::UNION3);", true);
+    }
+
+    public void testTypedClassConstants_05a() throws Exception {
+        checkOccurrences(getTestPath(), "    public const string|array UNION2 = 'a' . Inter^faceTest::STRING;", true);
+    }
+
+    public void testTypedClassConstants_05b() throws Exception {
+        checkOccurrences(getTestPath(), "interface Interf^aceTest {", true);
+    }
+
+    public void testTypedClassConstants_06a() throws Exception {
+        checkOccurrences(getTestPath(), "enum EnumT^est {", true);
+    }
+
+    public void testTypedClassConstants_06b() throws Exception {
+        checkOccurrences(getTestPath(), "    public const static A = Enum^Test::Test; // enum", true);
+    }
+
+    public void testTypedClassConstants_07a() throws Exception {
+        checkOccurrences(getTestPath(), "    public const WITHOUT^_TYPE = 1;", true);
+    }
+
+    public void testTypedClassConstants_07b() throws Exception {
+        checkOccurrences(getTestPath(), "    public const mixed MIXED = 1 + self::WITHOUT_^TYPE;", true);
+    }
+
+    public void testTypedClassConstants_07c() throws Exception {
+        checkOccurrences(getTestPath(), "var_dump(ClassTest::WITH^OUT_TYPE);", true);
+    }
+
+    public void testTypedClassConstants_08a() throws Exception {
+        checkOccurrences(getTestPath(), "    public const ?A NULLA^BLE = null;", true);
+    }
+
+    public void testTypedClassConstants_08b() throws Exception {
+        checkOccurrences(getTestPath(), "var_dump(ClassTest::NUL^LABLE);", true);
+    }
+
+    public void testTypedClassConstants_09a() throws Exception {
+        checkOccurrences(getTestPath(), "    private const A|B UNI^ON = A;", true);
+    }
+
+    public void testTypedClassConstants_09b() throws Exception {
+        checkOccurrences(getTestPath(), "var_dump(ClassTest::UN^ION);", true);
+    }
+
+    public void testTypedClassConstants_10a() throws Exception {
+        checkOccurrences(getTestPath(), "    protected const A&B INTER^SECTION = B;", true);
+    }
+
+    public void testTypedClassConstants_10b() throws Exception {
+        checkOccurrences(getTestPath(), "var_dump(ClassTest::INTE^RSECTION);", true);
+    }
+
+    public void testTypedClassConstants_11a() throws Exception {
+        checkOccurrences(getTestPath(), "    public const (A&B)|C D^NF = C;", true);
+    }
+
+    public void testTypedClassConstants_11b() throws Exception {
+        checkOccurrences(getTestPath(), "var_dump(ClassTest::D^NF);", true);
+    }
+
+    public void testTypedClassConstants_12a() throws Exception {
+        checkOccurrences(getTestPath(), "    public const string STR^ING = 'a';", true);
+    }
+
+    public void testTypedClassConstants_12b() throws Exception {
+        checkOccurrences(getTestPath(), "var_dump(ClassTest::ST^RING);", true);
+    }
+
+    public void testTypedClassConstants_13a() throws Exception {
+        checkOccurrences(getTestPath(), "    public const int I^NT = 1;", true);
+    }
+
+    public void testTypedClassConstants_13b() throws Exception {
+        checkOccurrences(getTestPath(), "var_dump(ClassTest::I^NT);", true);
+    }
+
+    public void testTypedClassConstants_14a() throws Exception {
+        checkOccurrences(getTestPath(), "    public const float FL^OAT = 1.5;", true);
+    }
+
+    public void testTypedClassConstants_14b() throws Exception {
+        checkOccurrences(getTestPath(), "var_dump(ClassTest::FL^OAT);", true);
+    }
+
+    public void testTypedClassConstants_15a() throws Exception {
+        checkOccurrences(getTestPath(), "    public const bool B^OOL = true;", true);
+    }
+
+    public void testTypedClassConstants_15b() throws Exception {
+        checkOccurrences(getTestPath(), "var_dump(ClassTest::B^OOL);", true);
+    }
+
+    public void testTypedClassConstants_16a() throws Exception {
+        checkOccurrences(getTestPath(), "    public const array A^RRAY = ['t', 'e', 's', 't'];", true);
+    }
+
+    public void testTypedClassConstants_16b() throws Exception {
+        checkOccurrences(getTestPath(), "var_dump(ClassTest::AR^RAY);", true);
+    }
+
+    public void testTypedClassConstants_17a() throws Exception {
+        checkOccurrences(getTestPath(), "    public const iterable ITER^ABLE = ['a', 'b', 'c'];", true);
+    }
+
+    public void testTypedClassConstants_17b() throws Exception {
+        checkOccurrences(getTestPath(), "var_dump(ClassTest::ITE^RABLE);", true);
+    }
+
+    public void testTypedClassConstants_18a() throws Exception {
+        checkOccurrences(getTestPath(), "    public const mixed MIX^ED = 1 + self::WITHOUT_TYPE;", true);
+    }
+
+    public void testTypedClassConstants_18b() throws Exception {
+        checkOccurrences(getTestPath(), "var_dump(ClassTest::MI^XED);", true);
+    }
+
+    public void testTypedClassConstants_19a() throws Exception {
+        checkOccurrences(getTestPath(), "    public const object OB^JECT = A;", true);
+    }
+
+    public void testTypedClassConstants_19b() throws Exception {
+        checkOccurrences(getTestPath(), "var_dump(ClassTest::OBJ^ECT);", true);
+    }
+
+    public void testTypedClassConstants_20a() throws Exception {
+        checkOccurrences(getTestPath(), "    public const string|array UNI^ON2 = 'a' . InterfaceTest::STRING;", true);
+    }
+
+    public void testTypedClassConstants_20b() throws Exception {
+        checkOccurrences(getTestPath(), "var_dump(ClassTest::UNIO^N2);", true);
+    }
+
+    public void testTypedClassConstants_21a() throws Exception {
+        checkOccurrences(getTestPath(), "    public const int|null UNI^ON3 = null;", true);
+    }
+
+    public void testTypedClassConstants_21b() throws Exception {
+        checkOccurrences(getTestPath(), "var_dump(ClassTest::UNIO^N3);", true);
+    }
+
+    public void testTypedClassConstants_22a() throws Exception {
+        checkOccurrences(getTestPath(), "    public const string|array UNION2 = 'a' . InterfaceTest::STR^ING;", true);
+    }
+
+    public void testTypedClassConstants_22b() throws Exception {
+        checkOccurrences(getTestPath(), "    const string STR^ING = \"string\"; // interface", true);
+    }
+
+    public void testTypedClassConstants_23a() throws Exception {
+        checkOccurrences(getTestPath(), "    public const static A = EnumTest::Tes^t; // enum", true);
+    }
+
+    public void testTypedClassConstants_23b() throws Exception {
+        checkOccurrences(getTestPath(), "    case T^est;", true);
+    }
 }