What are some common template systems used in PHP web development?

When developing web applications in PHP, it is common to use template systems to separate the logic from the presentation layer. Some popular template systems used in PHP web development include Twig, Blade, Smarty, and Plates. These template systems allow developers to create reusable and maintainable templates for their web applications.

// Example using Twig template system
require_once 'vendor/autoload.php';

$loader = new \Twig\Loader\FilesystemLoader('templates');
$twig = new \Twig\Environment($loader);

echo $twig->render('index.html', ['name' => 'John Doe']);