What are the best practices for defining constructors in PHP classes, and how has this evolved from PHP4 to PHP5?

Best practices for defining constructors in PHP classes include using the "__construct" method to define the constructor, setting default parameter values when necessary, and initializing class properties within the constructor. In PHP4, constructors were defined using the same name as the class, which could lead to confusion and potential errors. In PHP5, the introduction of the "__construct" method provided a clear and consistent way to define constructors.

class MyClass {
    private $property;

    public function __construct($param1, $param2 = 'default') {
        $this->property = $param1 . ' ' . $param2;
    }
}