What are the common reasons for PHP code to be displayed instead of executed on a webpage?

When PHP code is displayed instead of executed on a webpage, it typically indicates that the server is not configured to interpret PHP code. This can be due to missing PHP module, incorrect server configuration, or the file extension not being recognized as PHP. To solve this issue, you need to ensure that your server is set up to handle PHP files by installing PHP and configuring the server to recognize and execute PHP code.

<?php
echo "Hello, World!";
?>