Вопрос

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

Thanks!

Это было полезно?

Решение

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.

Другие советы

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>
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top