Re: [RFC] Four Pragmatic Directions for PHP: Simplicity, Arrays, Performance, Concurrency

From: Date: Tue, 24 Mar 2026 10:31:13 +0000
Subject: Re: [RFC] Four Pragmatic Directions for PHP: Simplicity, Arrays, Performance, Concurrency
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-130425@lists.php.net to get a copy of this message
On 24.03.2026 11:08, 沉默领域、 wrote:
// Current $names = array_values(array_filter($users, fn($u) => $u->active)); $first = count($names) > 0 ? $names[0] : null;
Not the best example, as you can also do: $first = array_find($users, fn ($user) => $user->active)?->name; There are some existing functions like array_column() and array_first() that seems you didn't know existed. So, there's been some progress in this territory too. -- Aleksander Machniak Kolab Groupware Developer [https://kolab.org] Roundcube Webmail Developer [https://roundcube.net] ---------------------------------------------------- PGP: 19359DC1 # Blog: https://kolabian.wordpress.com

« previous php.internals (#130425) next »