Skip to content

Commit 8532d26

Browse files
committed
More tests
1 parent 3b5603b commit 8532d26

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
--TEST--
2+
Backed int enum __toString is forbidden
3+
--FILE--
4+
<?php
5+
6+
enum Foo: int {
7+
case Bar = 0;
8+
9+
public function __toString()
10+
{
11+
return '__toString';
12+
}
13+
}
14+
15+
?>
16+
--EXPECTF--
17+
Fatal error: Enum may not include __toString in %s on line %d

0 commit comments

Comments
 (0)