本人菜鸟一枚,老鸟请略过!今天第一次见这种“(new class())->func()”写法,大概能猜出啥意思,但不敢确定,百度也没有找到答案,最后到一个 php 交流群里面得到解惑。
其(new class())->func()写法的意思就是实例化再调用如下:
$eg = new class(); $eg -> func();
本人菜鸟一枚,老鸟请略过!今天第一次见这种“(new class())->func()”写法,大概能猜出啥意思,但不敢确定,百度也没有找到答案,最后到一个 php 交流群里面得到解惑。
其(new class())->func()写法的意思就是实例化再调用如下:
$eg = new class(); $eg -> func();
Warning: strpos(): Empty needle in /home/www/wosn.net/wp-content/themes/begin/inc/inc.php on line 1178
荔乡根子GenZi.Win 1
1F
登录回复
简写了?