Credis_Client::_flattenArguments PHP Method

_flattenArguments() private static method

If an argument is an array, the key is inserted as argument followed by the array values array('zrangebyscore', '-inf', 123, array('limit' => array('0', '1'))) becomes array('zrangebyscore', '-inf', 123, 'limit', '0', '1')
private static _flattenArguments ( array $arguments, &$out = [] ) : array
$arguments array
return array
    private static function _flattenArguments(array $arguments, &$out = array())
    {
        foreach ($arguments as $key => $arg) {
            if (!is_int($key)) {
                $out[] = $key;
            }
            if (is_array($arg)) {
                self::_flattenArguments($arg, $out);
            } else {
                $out[] = $arg;
            }
        }
        return $out;
    }