What does the error "Cannot redeclare class" in PHP mean and how can it be resolved?

The error "Cannot redeclare class" in PHP occurs when you try to define a class that has already been defined in the same scope. To resolve this issue, you can use the `class_exists` function to check if the class has already been declared before defining it.

if (!class_exists('ClassName')) {
    class ClassName {
        // class definition
    }
}