user
You need to complete the following task:

Generate a correct PHP code for the following purpose

Create a function to calculate the area of a rectangle.

Answer:
assistant
function calculateAreaRect($length, $width) {
    $area = $length * $width;
    return $area;
}