Php versions – Cannot use null as default value for parameter in PHP-8
In php-8 and older versions the following code works class Foo { public function __construct(string $string = null) {} } But in php-8, along with property promotion, it throws an error class Foo { public function __construct(private string $string =…