mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2024-12-13 09:37:21 +01:00
39 lines
379 B
Plaintext
39 lines
379 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
|
||
|
{
|
||
|
case X = 1;
|
||
|
case Y = 2;
|
||
|
}
|
||
|
enum C implements D
|
||
|
{
|
||
|
case Z = 'A';
|
||
|
}
|