brackets-code-folding icon indicating copy to clipboard operation
brackets-code-folding copied to clipboard

PHP Multi-line String Issue

Open designcise opened this issue 10 years ago • 2 comments

If a multi-line string is inside an if or switch statement, the code block only gets collapsed till the start of the multi-line string, for example:

// if or switch here... $str = <<<STRING code .... STRING;

designcise avatar Jun 28 '14 23:06 designcise

could you give a concrete example rather than pseudo code?

thehogfather avatar Jun 30 '14 12:06 thehogfather

Seems to occur only when collapsing "case"; it doesn't collapse the multiline echo (PHP). Try collapsing 'case' in the following example:

switch($x) {
      case 'value':
            if(FALSE) {
                // do something
            }
            else {
                $multiline = <<<TEST
Output something...
TEST;
            }
      break;
}

designcise avatar Jul 01 '14 11:07 designcise