Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Readonly Properties - PHP 8.1

class BlogData
{
    public readonly Status $status;
  
    public function __construct(Status $status)
    {
        $this->status = $status;
    }
}
Source by www.php.net #
 
PREVIOUS NEXT
Tagged: #Readonly #Properties #PHP
ADD COMMENT
Topic
Name
9+1 =