What are the best practices for handling configuration properties in PHP classes?

When handling configuration properties in PHP classes, it is best practice to use class properties to store configuration values and initialize them through constructor parameters. This allows for easy access and modification of configuration settings within the class. Additionally, using type hinting and default parameter values can help ensure that the correct data types are used for configuration properties.

class ConfigurableClass {
    private $configValue;

    public function __construct($configValue) {
        $this->configValue = $configValue;
    }

    public function getConfigValue() {
        return $this->configValue;
    }
}

// Example usage
$configurable = new ConfigurableClass('exampleConfigValue');
echo $configurable->getConfigValue(); // Output: exampleConfigValue