What PHP functions can be used to extract and display link text from a webpage?

To extract and display link text from a webpage using PHP, you can use the `file_get_contents()` function to retrieve the webpage content, then use regular expressions or a HTML parser like DOMDocument to extract the link text.

$url = 'https://www.example.com';
$html = file_get_contents($url);

$dom = new DOMDocument();
@$dom->loadHTML($html);

$links = $dom->getElementsByTagName('a');
foreach ($links as $link) {
    echo $link->nodeValue . "<br>";
}