@@ -10,30 +10,30 @@ enum Foo: int {
10
10
try {
11
11
var_dump (Foo::Bar);
12
12
} catch (Error $ e ) {
13
- echo $ e ->getMessage (), "\n" ;
13
+ echo get_class ( $ e ), ' : ' , $ e ->getMessage (), "\n" ;
14
14
}
15
15
16
16
try {
17
17
var_dump (Foo::Bar);
18
18
} catch (Error $ e ) {
19
- echo $ e ->getMessage (), "\n" ;
19
+ echo get_class ( $ e ), ' : ' , $ e ->getMessage (), "\n" ;
20
20
}
21
21
22
22
try {
23
23
var_dump (Foo::from (42 ));
24
24
} catch (Error $ e ) {
25
- echo $ e ->getMessage (), "\n" ;
25
+ echo get_class ( $ e ), ' : ' , $ e ->getMessage (), "\n" ;
26
26
}
27
27
28
28
try {
29
29
var_dump (Foo::from ('bar ' ));
30
30
} catch (Error $ e ) {
31
- echo $ e ->getMessage (), "\n" ;
31
+ echo get_class ( $ e ), ' : ' , $ e ->getMessage (), "\n" ;
32
32
}
33
33
34
34
?>
35
35
--EXPECT--
36
- Enum case type string does not match enum backing type int
37
- Enum case type string does not match enum backing type int
38
- Enum case type string does not match enum backing type int
39
- Foo::from(): Argument #1 ($value) must be of type int, string given
36
+ TypeError: Enum case type string does not match enum backing type int
37
+ TypeError: Enum case type string does not match enum backing type int
38
+ TypeError: Enum case type string does not match enum backing type int
39
+ TypeError: Foo::from(): Argument #1 ($value) must be of type int, string given
0 commit comments