Heredoc can be tricky, I'll add it to bugs list. I'm not sure why in this case you don't structure your code like this:
Code: Select all
<?php
.. some php code here ..
?>
<script>
.. some javascript here ...
</script>
<?php
.. the rest of the php code here if required ..
?>
That would also ensure that syntax highlighting works better by letting the highlighter know that it's HTML code instead of a generic string literal.