$ php -v
PHP 7.4.16 (cli) (built: Mar 2 2021 10:35:27) ( ZTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.16, Copyright (c), by Zend Technologies
$ php process.php
#1 jenkins
#2 leroy
$ node -v
v12.21.0
$ node process.js
#1 jenkins
#2 leroy
$ ruby -v
ruby 2.6.6p146 (2020-03-31) [x86_64-linux]
$ ruby process.rb
#1 jenkins
#2 leroy
I spent most of the time debugging php version, even consider i work with php everyday.
C (crap) for php readability, strong A for javascript and A+ for ruby. Ruby version explicitly split filtering in two parts for readability and because it's ruby way. It could be 1 line like for the other two.
I weren't using ruby for years, I use javascript from time to time, these two didn't take much time, unlike php version. If we add additional criteria, php will look even more ugly, while javascript and ruby versions will stay readable and good (did i tell you i hate javascript btw?)