数组操作类
获取值
/**
* Gets a dot-notated key from an array, with a default value if it does
* not exist.
*
* @param array $array The search array
* @param mixed $key The dot-notated key or array of keys
* @param string $default The default value
* @return mixed
*/
public static function get($array, $key = null, $default = null, $filter_type = '', bool $throw_error = false)$arr = [
'name' => 'kaliphp'
];
echo $arr['country'];echo $arr['country'] ?? 'HK';通过表达式查询
Last updated