Alternative for PHP function parse_url()
The recommended function UrlHelper::parse() is not very helpful in this use-case. I could not find a drop-in replacement for this function and did not want to write my own.
When developing applications in Drupal you need to send mails from time to time. You can configure postfix or another mail server to send mail. Sometimes you can do without, or you do not want to let emails get out of your development machine at all. Imagine yourself working on a site with lots of users and want to test a part of the code which sends mail to users. You do not want to send mail to the users from your development environment. There are several ways to keep your installation from sending mail to users.