What best practice should be followed when initializing object properties in PHP classes?

When initializing object properties in PHP classes, it is a best practice to explicitly define the properties within the class itself to ensure clarity and maintainability. This can be done by assigning default values to the properties directly in the class definition or in the class constructor.

class MyClass {
    public $property1 = 'default value';
    public $property2;

    public function __construct() {
        $this->property2 = 'another default value';
    }
}