src/Util/Arrays.php
public static function searchKey(array $arr, $key)
    {
        $foo = [$key => null];

        return ($tmp = \array_search(\key($foo), \array_keys($arr), true)) === false ? null : $tmp;
    }
public static function searchKey(array $arr, $key)
    {
        $foo = [$key => null];

        return ($tmp = \array_search(\key($foo), \array_keys($arr), true)) === false ? null : $tmp;
    }
public static function searchKey ( array $ arr , $ key ) { $ foo = [ $ key => null ] ; return ( $ tmp = \ array_search ( \ key ( $ foo ) , \ array_keys ( $ arr ) , true ) ) === false ? null : $ tmp ; }
Searches the array for a given key and returns the offset if successful.

@param array      $arr
@param int|string $key

@return int|null|string offset if it is found, null otherwise
Searches the array for a given key and returns the offset if successful .