- var_dump: documentation ( source)
<?php
class A {
public function __construct(
public int $a = 1
) {}
}
class B extends A {
public function __construct(
public string $b = 'hello'
) {}
}
$b = new B();
$b=1;
var_dump($b->a, $b->b);