Why not just do `stripos($url, 'mailto') === 0`?