- Output for 8.1.0 - 8.1.29, 8.2.0 - 8.2.22, 8.3.0 - 8.3.11
- Parameter access: abc Property access: abc
<?php
class Test {
public function __construct(
public string $promoted = 'abc',
) {
echo 'Parameter access: ', $promoted, PHP_EOL;
echo 'Property access: ', $this->promoted, PHP_EOL;
}
}
new Test;