Skip to content

Commit edbb91d

Browse files
committed
Add a test for a class and a function with the same name
1 parent 4cb53a0 commit edbb91d

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
--TEST--
2+
A function and a class with the same name
3+
--FILE--
4+
<?php
5+
6+
function Something(): string
7+
{
8+
return 'Another';
9+
}
10+
class Something {}
11+
class Another {}
12+
13+
echo Something() . PHP_EOL;
14+
var_dump(new Something());
15+
var_dump(new (Something()));
16+
17+
?>
18+
--EXPECT--
19+
Another
20+
object(Something)#1 (0) {
21+
}
22+
object(Another)#1 (0) {
23+
}

0 commit comments

Comments
 (0)