← All docs

parse_url()

Parses a URL and returns its components.

parse_url()

function parse_url(string $url, int $component = -1): mixed

Parses a URL and returns its components.

Parameters:

  • $url (string)
  • $component (int), default -1, optional

Returns: mixed

Availability

No examples yet — check examples/ and showcases/ for usage patterns.

Internals

For how parse_url is implemented in the compiler, see the internals page.