芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/rentandbuyrealty.com/pay/vendor/wixel/gump/src/ArrayHelpers.php
{$segment})) { $target = $target->{$segment}; } else { return $default; } } return $target; } /** * Determine whether the given value is array accessible. * * @param mixed $value * @return bool */ public static function accessible($value) { return is_array($value) || $value instanceof ArrayAccess; } /** * Determine if the given key exists in the provided array. * * @param \ArrayAccess|array $array * @param string|int $key * @return bool */ public static function exists($array, $key) { if ($array instanceof ArrayAccess) { return $array->offsetExists($key); } return array_key_exists($key, $array); } /** * Collapse an array of arrays into a single array. * * @param array $array * @return array */ public static function collapse($array) { $results = []; foreach ($array as $values) { if (! is_array($values)) { continue; } $results[] = $values; } return array_merge([], ...$results); } }