src/Cache/Simple/AbstractAdapter.php
public function getMultiple($keys, $default = null)
	{
		if (empty($keys)) {
			return [];
		}

		// note: the array_combine() is in place to keep an association between our $keys and the $namespacedKeys
		\array_walk($keys, [$this, 'validateKey']);

		$prefixed = $keys;
		$this->namespace && \array_walk($prefixed, [$this, 'prefixValue']);

		$namespacedKeys = \array_combine($keys, $prefixed);
		$items = $this->doGetMultiple($namespacedKeys);

		$return = [];
		// no internal array function supports this sort of mapping: needs to be iterative
		// this filters and combines keys in one pass
		foreach ($namespacedKeys as $k => $v) {
			[$found, $value] = $items[$v] ?? [false, null];
			$return[$k] = $found === true ? $value : $default;
		}

		return $return;
	}
public function getMultiple($keys, $default = null)
	{
		if (empty($keys)) {
			return [];
		}

		// note: the array_combine() is in place to keep an association between our $keys and the $namespacedKeys
		\array_walk($keys, [$this, 'validateKey']);

		$prefixed = $keys;
		$this->namespace && \array_walk($prefixed, [$this, 'prefixValue']);

		$namespacedKeys = \array_combine($keys, $prefixed);
		$items = $this->doGetMultiple($namespacedKeys);

		$return = [];
		// no internal array function supports this sort of mapping: needs to be iterative
		// this filters and combines keys in one pass
		foreach ($namespacedKeys as $k => $v) {
			[$found, $value] = $items[$v] ?? [false, null];
			$return[$k] = $found === true ? $value : $default;
		}

		return $return;
	}
public function getMultiple ( $ keys , $ default = null ) { if ( empty ( $ keys ) ) { return [ ] ; } // note: the array_combine() is in place to keep an association between our $keys and the $namespacedKeys \ array_walk ( $ keys , [ $ this , 'validateKey' ] ) ; $ prefixed = $ keys ; $ this -> namespace && \ array_walk ( $ prefixed , [ $ this , 'prefixValue' ] ) ; $ namespacedKeys = \ array_combine ( $ keys , $ prefixed ) ; $ items = $ this -> doGetMultiple ( $ namespacedKeys ) ; $ return = [ ] ; // no internal array function supports this sort of mapping: needs to be iterative // this filters and combines keys in one pass foreach ( $ namespacedKeys as $ k => $ v ) { [ $ found , $ value ] = $ items [ $ v ] ?? [ false , null ] ; $ return [ $ k ] = $ found === true ? $ value : $ default ; } return $ return ; }
Returns an associative array of values for keys is found in cache.

@param string[] $keys Array of keys to retrieve from cache
@param mixed    $default

@return mixed[] Array of retrieved values, indexed by the specified keys.
Values that couldn't be retrieved are not contained in this array.
Returns an associative array of values for keys is found in cache .