PHP Alternative Control Structures, any drawbacks?

后端 未结 5 1051
天涯浪人
天涯浪人 2021-01-21 02:14

I\'ve been working with PHP code that generates HTML without any templating, and it\'s quite spaghetti and difficult to read with the way they\'ve structured it. On

5条回答
  •  面向向阳花
    2021-01-21 02:45

    to answer directly: Yes, it is standard and portable and it isn't any slower. It is a simple alternative to the standard curly-brace syntax. Whether or not you choose to use it is up to you as a style choice.

    Personally, having been taught and used c-style languages my whole programming career (thus far) i prefer the curly braces with a simple comment after the end of the } curly brace that tells you what it is ending.

提交回复
热议问题