There is a piece of pug code

p.text-center Все права защищены &copy '<?= date('Y');?>' 

But compiled php code commented out, framed quotes, the result is the same, what could be the problem?

 <p class="text-center">Все права защищены © "<!--?= date('Y');?-->"</p> 

    2 answers 2

    You must enable the short_open_tag http://linux-notes.org/vklyuchit-vy-klyuchit-short_open_tag-v-php/

    Or write the code like this:

     p.text-center Все права защищены &copy '<php echo date('Y'); ?>' 
    • The essence of the question is not in php and short tag, but in the fact that "pug" makes the php code comment All rights reserved © <! -? Php echo date ('Y');? ->; - Ghost Dogg

    Screen functions can be through | . Below is an example with the PHP function:

      h1 FAQ .summury details summary Some text p | <?php md_cache()?> 

    The above code will compile to:

      <h1>FAQ</h1> <div class="summury"> <details> <summary>Some text</summary> <p><?php md_cache()?></p> <details>