3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 'foo' => 'one', 'bar' => [ 'boo' => 'two', 'foo' => 'three', 'loo' => [ 'foo' => 'four', ], ], 'goo' => [ 'foo' => 'five', ] ]; var_export( array_walk_recursive( $array, function($value, $key, $matchingKey){ return (strcasecmp($key, $matchingKey) == 0)? true : false; }, 'fighters' //'foo' ) );

preferences:
36.43 ms | 402 KiB | 5 Q