Question

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

Thanks!

Était-ce utile?

La solution

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.

Autres conseils

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

Try this:

// <editor-fold defaultstate="collapsed" desc="user-description">
  ...any code...
// </editor-fold>
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top