Skip to content

Commit bc81f17

Browse files
authored
Use short function for array_find example (#1125)
1 parent 80774e8 commit bc81f17

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

releases/8.4/release.inc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -355,9 +355,7 @@ PHP
355355
<<<'PHP'
356356
$animal = array_find(
357357
['dog', 'cat', 'cow', 'duck', 'goose'],
358-
static function (string $value): bool {
359-
return str_starts_with($value, 'c');
360-
},
358+
static fn(string $value): bool => str_starts_with($value, 'c'),
361359
);
362360
363361
var_dump($animal); // string(3) "cat"

0 commit comments

Comments
 (0)