private static function findInArray(array $array, string $key, $default = null)
    {
        if (($pos = strrpos($key, '.')) !== false) {
            $array = self::findInArray($array, substr($key, 0, $pos), $default);
            $key = substr($key, $pos + 1);
        }

        return is_array($array) && array_key_exists($key, $array) ? $array[$key] : $default;
    }
private static function findInArray(array $array, string $key, $default = null)
    {
        if (($pos = strrpos($key, '.')) !== false) {
            $array = self::findInArray($array, substr($key, 0, $pos), $default);
            $key = substr($key, $pos + 1);
        }

        return is_array($array) && array_key_exists($key, $array) ? $array[$key] : $default;
    }
private static function findInArray ( array $ array , string $ key , $ default = null ) { if ( ( $ pos = strrpos ( $ key , '.' ) ) !== false ) { $ array = self :: findInArray ( $ array , substr ( $ key , 0 , $ pos ) , $ default ) ; $ key = substr ( $ key , $ pos + 1 ) ; } return is_array ( $ array ) && array_key_exists ( $ key , $ array ) ? $ array [ $ key ] : $ default ; }
Retrieves the value of an array element or object property with the given key or property name.

@param $array
@param $key
@param null $default
@return mixed|null
Retrieves the value of an array element or object property with the given key or property name .