如果“;”,解释器是否有任何额外的负载?设置到下一行?

Are there any additional loads for interpreter if ";" set to the next line?

我想知道解释器是如何读取它的指令和结束符号的(;)

我试着做了一些测试,但我的硬件不是很敏感,看不出差异

例如,我有:

$someObject->firstAction()->secondAction()->thirdAction();

如果我这样做,解释器将如何表现:

$someObject
    ->firstAction()
    ->secondAction()
    ->thirdAction()
;

我想知道类似的"beautiful"代码格式是否有不利影响?

这种格式可以工作,是的,但它不符合与其他 php 程序员一起工作的规范。 https://www.php-fig.org/psr/psr-2/

但如果您自己编写代码,那么我看不出有任何问题。

安迪诺普