
<?php
declare(strict_types = 1);
/**
* @property-read string $bar
*/
class HelloWorld
{
public string $bar;
public function __construct()
{
$this->bar = 'wdadasd';
}
}
$t = new HelloWorld();
$t->bar = 'aasdasdasdasd';
?>
What's wrong with analyse of this class? I wanna read-only bar property.