<?php
class Radical
{
public $actor;
public function __construct(string $actor)
{
$this->actor = $actor;
}
}
$r = new Radical('Keanu Reeves');
echo $r->actor;
Catchable fatal error: Argument 1 passed to Radical::__construct() must be an instance of string, string given, called in /in/22Xt9 on line 13 and defined in /in/22Xt9 on line 7
Process exited with code 255.