Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8532d26

Browse filesBrowse files
committed
More tests
1 parent 3b5603b commit 8532d26
Copy full SHA for 8532d26

File tree

Expand file treeCollapse file tree

2 files changed

+17
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+17
-0
lines changed
+17Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.