0

I want to know how interpreter reads the instructions and end-symbol of it (;)

I tried to do some tests, but my hardware is not so sensitive to see the difference

For example, i have:

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

How the interpreter will behave if i do this:

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

I want to find out if similar "beautiful" code formatting adversely affects?

Kart Av1k
  • 137
  • 1
  • 6

1 Answers1

1

This format would work, yes, but it wouldn't fit the norms to work with other php programmers. https://www.php-fig.org/psr/psr-2/

But if you code it for yourself, then I don't see any issues.

AndyNope

AndyNope
  • 427
  • 6
  • 12
  • So, for interpreter does not matter how code was styled – Kart Av1k Jul 25 '19 at 08:14
  • I have been taught, that it doesn't matter as long the interpreter understands your code. The interpreter works like a library and just call directly the mashine code or a bundle of binary codes that is named as that function. **For Example:** 1 0000 B8140000 mov eax,0x14 1 00 – AndyNope Jul 25 '19 at 10:18
  • I tested in a MVC framework and the performance was the same. Only the size of your file will increase. (1byte a space) – AndyNope Jul 25 '19 at 10:26
  • here another reference: https://stackoverflow.com/questions/15368168/does-white-space-slow-down-processing I hope I could help you. – AndyNope Jul 25 '19 at 10:29