object(User)#1 (2) {
["id"]=>
int(1)
["age"]=>
object(ValidAge)#2 (1) {
["age"]=>
int(33)
}
}
Fatal error: Uncaught TypeError: User::__construct(): Argument #2 ($age) must be of type ValidAge, NotValidAge given, called in /in/WksJS on line 46 and defined in /in/WksJS:32
Stack trace:
#0 /in/WksJS(46): User->__construct(1, Object(NotValidAge))
#1 {main}
thrown in /in/WksJS on line 32
Process exited with code 255.
Output for 8.1.30 - 8.1.33
Parse error: syntax error, unexpected token "readonly", expecting end of file in /in/WksJS on line 3
Process exited with code 255.