← All docs

urlencode()

URL-encodes a string using application/x-www-form-urlencoded rules.

urlencode()

function urlencode(string $string): string

URL-encodes a string using application/x-www-form-urlencoded rules.

Parameters:

  • $string (string)

Returns: string

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

Internals

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