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
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported — declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/string/parse_url.rs).
No examples yet — check examples/ and showcases/ for usage patterns.
Internals
For how parse_url is implemented in the compiler, see the internals page.