$value) { $key = strval($key); $key = $rootKey !== '' ? ($rootKey . '.' . $key) : $key; if (is_array($value)) { $result = $result + array_dot($value, $key); continue; } $result[$key] = $value; } return $result; } } if (!function_exists('str_starts_with')) { /** * @param string $haystack * @param string $needle * @return bool */ function str_starts_with(string $haystack, string $needle): bool { return substr($haystack, 0, strlen($needle)) === $needle; } }