Skip to content

Commit 86b54e5

Browse files
committed
feat: add a test
1 parent 624a734 commit 86b54e5

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
--TEST--
2+
Arrow function as a class member
3+
--FILE--
4+
<?php
5+
6+
class a{
7+
public function test() {
8+
return 111;
9+
}
10+
public fn test2() => 222;
11+
private fn test3() => 333;
12+
static fn test4() => 444;
13+
protected static fn &test5() => 555;
14+
}
15+
16+
$a = new a();
17+
18+
var_dump($a->test());
19+
var_dump($a->test2());
20+
var_dump($a::test4());
21+
?>
22+
--EXPECT--
23+
int(111)
24+
int(222)
25+
int(444)

0 commit comments

Comments
 (0)