<?php class Foo { public function __construct( public ?string $prop = null, ) {} } class Bar extends Foo { public function __construct( public ?string $bar = null, ) { parent::__construct(); } } // Echoes nothing, but it works as expected. echo (new Bar())->prop;
You have javascript disabled. You will not be able to edit any code.