Does using Alternative Syntax change performance?

Asked

Viewed 53 times

4

  • Hardly ...

  • 1

    No ( ) ()

  • What makes a difference is the readability of the code. If you use the ternary operator for flow control, the code is much less readable.

2 answers

1

That would hardly have any effect on performance. PHP and other scripting languages already lose performance (compared to compiled ones) by being interpreted. Performance should be when you find some bottleneck in the system(slowness), but first it is necessary to measure it, otherwise how will you know?

0

The amount of extra script is very small (can be said to be insignificant), so processing will be fast and without visible changes.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.