New function isOnCurrentHost gives a convenient way of checking that the passed URL matches the current host. One use would be to limit BE editors to referencing URLs only to the current host.
Ex:
if (t3lib_div::isOnCurrentHost($url)) {
// Do something
}
More info:
RFC: #10724: Feature: Provide a check that compare a given URL with the host, TYPO3 is running on!
http://bugs.typo3.org/view.php?id=10724