<?php function demo( MissingClass|string $e ) { echo $e; } function demo2(): MissingClass|string { return "Or here\n"; } class WithProp { public MissingClass|string $val; public function __construct() { $this->val = "Or here either\n"; } } demo( "No errors here\n" ); print( demo2() ); $d = new WithProp(); echo $d->val;
You have javascript disabled. You will not be able to edit any code.