How can the code snippet be improved to enhance readability and maintainability in PHP?

The code snippet can be improved by using proper indentation, adding comments to explain the functionality of each section, and breaking down the code into smaller, more manageable functions. This will enhance readability and maintainability of the code.

<?php

// Define a function to calculate the area of a rectangle
function calculateRectangleArea($length, $width) {
    return $length * $width;
}

// Define variables for length and width
$length = 10;
$width = 5;

// Calculate the area of the rectangle
$area = calculateRectangleArea($length, $width);

// Output the result
echo "The area of the rectangle is: " . $area;

?>