[web-php] master: Use short function for array_find example (#1125)

From: Date: Tue, 19 Nov 2024 19:03:46 +0000
Subject: [web-php] master: Use short function for array_find example (#1125)
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-32287@lists.php.net to get a copy of this message
Author: Theodore Brown (theodorejb) Committer: GitHub (web-flow) Pusher: saundefined Date: 2024-11-19T21:59:29+03:00 Commit: https://github.com/php/web-php/commit/bc81f174a11fce0355e07fc26c424f52ee470f60 Raw diff: https://github.com/php/web-php/commit/bc81f174a11fce0355e07fc26c424f52ee470f60.diff Use short function for array_find example (#1125) Changed paths: M releases/8.4/release.inc Diff: diff --git a/releases/8.4/release.inc b/releases/8.4/release.inc index 4a0bb7308a..c60678cab3 100644 --- a/releases/8.4/release.inc +++ b/releases/8.4/release.inc @@ -355,9 +355,7 @@ PHP <<<'PHP' $animal = array_find( ['dog', 'cat', 'cow', 'duck', 'goose'], - static function (string $value): bool { - return str_starts_with($value, 'c'); - }, + static fn(string $value): bool => str_starts_with($value, 'c'), ); var_dump($animal); // string(3) "cat"

« previous php.webmaster (#32287) next »