Hi
I have a problem when auto formatting (CTRL-SHIFT-F) a php file with some strings defined with the HEREDOC syntax.
If the definition of the string is in an area which is already indented the end marker for the HEREDOC- string need to be on the start of a new line. If not there will be a "PHP Parse error" after that line.
Example:
<?php
function foo(){
echo <<<EOT
Ha, you found foo ...
so we can do some funny things here.
EOT;
}
foo();
?>
This code is working as expected. After doing automatic formatting with CTRL-SHIFT-F the code looks like this:
<?php
function foo()
{
echo <<<EOT
Ha, you found foo ...
so we can do some funny things here.
EOT;
}
foo();
?>
Besides that it is not parsable anymore the formatting within the string is "destroyed" as the spaces inserted are printed to if I make the code usable again by deleting the spaces before "EOT;".
Is there a way to configure this to work properly or is this a bug with PDT?
Regards
Bernd