use MediaWiki\Linker\Linker; $url = 'https://example.com'; $text = 'Example Website'; $attribs = array('class' => 'external'); $link = Linker::makeExternalLink($url, $text, $attribs);
Example WebsiteOverall, Linker is a versatile package library for working with links in PHP and can be useful for building web applications that require linking URLs to external sources.