> > $fooClass = Foo::class; > > echo $foo::class; // TypeError b/c string? > > Yes, at least per the current proposal. Whether to allow this is listed as > an open question. >
I missed that part! If it could return `string`, that'd be super useful! We have tons of lines of code that look like: is_object($foo) ? get_class($foo) : gettype($foo) Getting rid of them would be very sweet ! Nicolas