What is the best practice for assigning cases to links in a switch statement for including pages in PHP?

When using a switch statement to include different PHP pages based on a case, it is best practice to assign each case to a specific page link. This makes the code easier to read and maintain, as each case clearly indicates which page will be included. Additionally, it helps prevent errors and ensures that the correct page is included for each case.

<?php
$page = isset($_GET['page']) ? $_GET['page'] : 'home';

switch ($page) {
    case 'home':
        include 'home.php';
        break;
    case 'about':
        include 'about.php';
        break;
    case 'contact':
        include 'contact.php';
        break;
    default:
        include '404.php';
        break;
}
?>