Is there an equivilent of c#\'s #region in PHP?
There is no equivalent (the other answers explain why), but let me show you how I do it:
//////////////////////////
/* REGION A */ {
function SomeFunction() {
return true;
}
function AnotherFunction() {
return false;
}
}
//////////////////////////
/* REGION B */ {
function ThirdFunction() {
return true;
}
function FourthFunction() {
return false;
}
}
The curly braces allow me to fold the block of code (your editor will need to support cold folding, but almost all of them do), while I still see the region name and have a simple visual divider.
Folded Result:
//////////////////////////
/* REGION A */ {
//////////////////////////
/* REGION B */ {