Signature, return type and hooks compared across 5 parsed releases.
6.9.0
Prepends https:// to the URL if it does not already contain a scheme and the first item in $protocols is 'https'.from the docblock
6.1.0
Turned into an alias for sanitize_url().from the docblock
2.8.0
Introduced.from the docblock
About this page
Parsed data
Generated from the wordpress-develop 6.9.7 tag, from src/wp-includes/formatting.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.