Skip to content

Commit eb31c2d

Browse files
committed
oldClassConstructors: add a test case
1 parent b0d4786 commit eb31c2d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

testcases.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,14 @@ trait numeric { /*...*/ }
127127
class C {}
128128
$c =& new C;
129129
$c =&new C;
130+
131+
// Methods with the same name as their class will not be constructors in a future version of PHP
132+
class FooBar {
133+
var $test = 42;
134+
135+
function set() {}
136+
137+
function FooBar() {
138+
// NOP
139+
}
140+
}

0 commit comments

Comments
 (0)