mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2024-12-12 09:09:41 +01:00
39 lines
394 B
Plaintext
39 lines
394 B
Plaintext
Enum
|
|
-----
|
|
<?php
|
|
|
|
enum A implements B
|
|
{
|
|
case X;
|
|
case Y;
|
|
|
|
public function foo() {}
|
|
}
|
|
|
|
enum B: int {
|
|
case X = 1;
|
|
case Y = 2;
|
|
}
|
|
|
|
enum C: string implements D {
|
|
case Z = 'A';
|
|
}
|
|
-----
|
|
!!php7
|
|
enum A implements B
|
|
{
|
|
case X;
|
|
case Y;
|
|
public function foo()
|
|
{
|
|
}
|
|
}
|
|
enum B : int
|
|
{
|
|
case X = 1;
|
|
case Y = 2;
|
|
}
|
|
enum C : string implements D
|
|
{
|
|
case Z = 'A';
|
|
} |