summaryrefslogtreecommitdiff
path: root/Zend/tests/enum/no-from.phpt
blob: 1cf717de88a107e23c6541b943d9f1e6c22bf062 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--TEST--
Enum no manual from method
--FILE--
<?php

enum Foo: int {
    case Bar = 0;

    public static function from(string|int $value): self {
        return $this;
    }
}

?>
--EXPECTF--
Fatal error: Cannot redeclare Foo::from() in %s on line %d