Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move the parse_url() caution up to description section #3834

Merged
merged 1 commit into from
Oct 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions reference/url/functions/parse-url.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@
URLs are also accepted, <function>parse_url</function> tries its best to
parse them correctly.
</para>
<caution>
<para>
This function may not give correct results for relative or invalid URLs,
and the results may not even match common behavior of HTTP clients.
If URLs from untrusted input need to be parsed, extra validation is
required, e.g. by using <function>filter_var</function> with the
<constant>FILTER_VALIDATE_URL</constant> filter.
</para>
</caution>
</refsect1>

<refsect1 role="parameters">
Expand Down Expand Up @@ -252,15 +261,6 @@ array(3) {

<refsect1 role="notes">
&reftitle.notes;
<caution>
<para>
This function may not give correct results for relative or invalid URLs,
and the results may not even match common behavior of HTTP clients.
If URLs from untrusted input need to be parsed, extra validation is
required, e.g. by using <function>filter_var</function> with the
<constant>FILTER_VALIDATE_URL</constant> filter.
</para>
</caution>
<note>
<para>
This function is intended specifically for the purpose of parsing URLs
Expand Down