Is the function esc_url commonly used in standard PHP, or does it belong to a specific framework like Wordpress?

The `esc_url` function is commonly used in WordPress for escaping URLs to prevent XSS attacks. It is not a standard PHP function and is specific to WordPress. If you need to escape URLs in a non-WordPress PHP project, you can achieve similar functionality by using the `filter_var` function with the `FILTER_SANITIZE_URL` filter.

$url = 'https://example.com/<script>alert("XSS attack")</script>';
$escaped_url = filter_var($url, FILTER_SANITIZE_URL);
echo $escaped_url;