Skip to content

Commit 86fd208

Browse files
authored
Update README.md
1 parent 8136b21 commit 86fd208

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,22 @@ dd(export_closure($closure));
1616
static function(string $filename) use($fileReader): string {
1717
return $fileReader->read($filename);
1818
}
19-
"""
2019
20+
$closure = static fn(): string => __FILE__ ;
21+
22+
dd(export_closure($closure));
23+
24+
^ "static fn(): string => 'path/to/closure/filename'"
25+
26+
class A {
27+
public function call()
28+
{
29+
$closure = fn(): string => self::class ;
30+
dd(export_closure($closure));
31+
}
32+
}
33+
34+
^ "fn(): string => \A::class"
35+
36+
```
2137

0 commit comments

Comments
 (0)