I am a novice, please skip the old bird! The first time I saw this writing method of "(new class()) ->func()" today, I can probably guess what it means, but I'm not sure. Baidu didn't find the answer, and finally I got the answer in a php communication group.
The writing of (new class()) ->func() means instantiating and calling again as follows:
$eg = new class(); $eg -> func();