Skip to content

Latest commit

 

History

History
16 lines (12 loc) · 272 Bytes

DuplicateConstant.md

File metadata and controls

16 lines (12 loc) · 272 Bytes

DuplicateConstant

Emitted when a constant is defined twice in a single class or when there's a clash between a constant and an enum case.

<?php
class C {
    public const A = 1;
    public const A = 2;
}

Why this is bad

The above code won’t compile.