Difference between revisions of "Function lists"

From EditPlus Wiki
Jump to: navigation, search
m (alcnaelt)
m (Reverted edits by ElttrC4tta (Talk); changed back to last version by ElfQrin)
Line 1: Line 1:
chiraczelle
 
 
==PHP5==
 
==PHP5==
 
When using classes in PHP5 the function keyword can be preceded by "public", "private" or "protected".  The following updated regex takes account of this change from PHP4.  If you don't know why you might need this, then you probably don't.
 
When using classes in PHP5 the function keyword can be preceded by "public", "private" or "protected".  The following updated regex takes account of this change from PHP4.  If you don't know why you might need this, then you probably don't.

Revision as of 07:19, 15 July 2008

PHP5

When using classes in PHP5 the function keyword can be preceded by "public", "private" or "protected". The following updated regex takes account of this change from PHP4. If you don't know why you might need this, then you probably don't.

^[ \t]*(public[ \t]|protected[ \t]|private[ \t]|)[ \t]*function[ \t].*\([^;]*$

To also show classes in the function list use the following:

^[ \t]*((public[ \t]|protected[ \t]|private[ \t]|)[ \t]*function[ \t].*\()|(class[ \t].*\{)[^;]*$