What are the potential issues with calling a PHP function from an HTML environment?

One potential issue with calling a PHP function from an HTML environment is that the PHP code may not be executed properly due to the server not recognizing the PHP code within the HTML file. To solve this issue, you can rename the HTML file to have a .php extension so that the server knows to interpret the PHP code within the file.

<!-- index.php -->
<!DOCTYPE html>
<html>
<head>
    <title>Calling PHP function from HTML</title>
</head>
<body>
    <?php
        function hello() {
            echo "Hello, world!";
        }

        hello();
    ?>
</body>
</html>