<?php class A { public function __construct( private int $v ) {} public function f () { echo $this->v, PHP_EOL; } } class B extends A { public function __construct( $v, private string $v2 ) { parent::__construct($v); } public function f2 () { echo $this->v2, PHP_EOL; } } $i = new B(1,'2'); $i->f(); $i->f2();
You have javascript disabled. You will not be able to edit any code.