How can the code snippet provided be improved to adhere to modern PHP best practices?

The provided code snippet mixes HTML and PHP code in a single file, which is not considered a good practice. To adhere to modern PHP best practices, it is recommended to separate PHP logic from HTML presentation by using a template engine like Twig or Blade. This separation improves code readability, maintainability, and encourages the use of MVC architecture.

```php
<?php
// Separate PHP logic from HTML presentation using a template engine like Twig or Blade
// Example using Twig template engine

require_once 'vendor/autoload.php';

$loader = new Twig_Loader_Filesystem('templates');
$twig = new Twig_Environment($loader);

$template = $twig->load('index.html.twig');

echo $template->render([
    'title' => 'Welcome to My Website',
    'content' => 'Hello, this is some content.'
]);
```

In this improved code snippet, we use the Twig template engine to separate the PHP logic from the HTML presentation. The template file 'index.html.twig' contains the HTML structure, and the PHP code passes data to the template for rendering. This separation helps improve code organization and maintainability.