PHP #region for code folding?

前端 未结 15 1438
星月不相逢
星月不相逢 2021-01-31 14:06

Is there an equivilent of c#\'s #region in PHP?

15条回答
  •  遥遥无期
    2021-01-31 15:00

    No.

    The thing is, C# is sort of designed to be written by only one IDE, because Microsoft need you to always use their tools. So, built into the language (sort of) are things that affect the IDE.

    PHP, on the other hand, is just a language. It's not supposed to have a symbiotic relationship with some specific editor, so it doesn't. So, no, it has nothing to control your editor.

    Still, all proper programming text editors support folding class definitions, function definitions, and most scope blocks. Some editors may allow certain extensions to go beyond this.

提交回复
热议问题