Vanilla 1.1.1 is a product of Lussumo. More Information: Documentation, Community Support.
Is it okay with heredoc that the END; is not at the start of the line actually? When you delete the whitespace before the END; the highlighting is okay.
As far as I know… PHP will not consider that END; as a closing identifier if there are other characters in front.
Edit: “That means especially that the identifier may not be indented”, look in the PHP manual on heredoc syntax in the Warning box.
So it is not a bug then :)
No, it is not a bug. idyllrain is correct in assuming that the HEREDOC statement style requires the ending delimiter to be on its own line with absolutely nothing (no whitespace) appearing to the left. This applies to both PHP and Perl (and perhaps any other language that uses the syntax).
Furthermore, any whitespace prior to the actual code being sent to standard output will also be included…therefore, all code after the initial echo and desired delimiter should probably be forced to the utmost left (without automatic spacing). Therefore…is it possible for a snippet to override the default indentation within Intype?
Same in ruby too. I think heredocs are pretty standard across the board.
Different? How so? The example uses the correct syntax (the one we’ve been discussing above):
echo <<<END
This uses the "here document" syntax to output
multiple lines with $variable interpolation. Note
that the here document terminator must appear on a
line with just a semicolon. no extra whitespace!
END;
:-/
yarden: then why in the echo manual its different?
http://il2.php.net/echo
What is different? In that example the heredoc END marker is not indented. Most languages that has heredocs (PHP, Perl) requires the end marker to start at column zero. Ruby does allow the marker to be indented using a special syntax, e.g.
puts <<END
stuff
END
versus
puts <<-END
stuff
END
The highlighting is OK both in Intype and on the PHP site.
your right, we need to remove white space before END;
1 to 13 of 13