1

In C# I can write #region and #endregion, is there an equivalent in PHP that works with all IDEs?

Thanks!

Shiplu Mokaddim
  • 56,364
  • 17
  • 141
  • 187
EOB
  • 2,975
  • 17
  • 43
  • 70

3 Answers3

2

Try this:

// <editor-fold defaultstate="collapsed" desc="user-description">
  ...any code...
// </editor-fold>
Undo
  • 25,519
  • 37
  • 106
  • 129
2

This isn't natively supported, but instead it would be IDE-specific. And this doesn't strictly mean #region support per se, but rather 'code folding' in whatever fashion any IDE (or extension/plugin) supports. Here, and here are a couple of examples.

Grant Thomas
  • 44,454
  • 10
  • 85
  • 129
2

No there is no #region in PHP. Its related to IDE/Editor actually. Not related to language.

Shiplu Mokaddim
  • 56,364
  • 17
  • 141
  • 187