We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 11b7f1a commit 268c79eCopy full SHA for 268c79e
src/test/php/lang/ast/unittest/emit/ParameterTest.class.php
@@ -135,6 +135,12 @@ public function closure_as_default() {
135
Assert::equals(2, $function(1));
136
}
137
138
+ #[Test]
139
+ public function first_class_callable_as_default() {
140
+ $function= $this->param('$op= strlen(...)')->default();
141
+ Assert::equals(4, $function('Test'));
142
+ }
143
+
144
#[Test]
145
public function trailing_comma_allowed() {
146
$p= $this->declare('class %T { public function fixture($param, ) { } }')
0 commit comments