Skip to content

Read only property #4082

@snezhkoigor

Description

@snezhkoigor

Снимок экрана 2020-11-13 в 10 36 41

<?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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions