There is a PHP code:

echo <<<TEST Какой то текст, какая то {$value}. Но как вызвать константу {CONST} TEST; 

Inside heredoc, you really need to refer to the constant. How to do it. As in the example it does not work. Tell me please.

    1 answer 1

     $str= <<<TEST Какой то текст, какая то {$value}. Но как вызвать константу %s TEST; echo sprintf($str, CONST); 
    • It does not work like that. Writes - Warning: sprintf (): Too few arguments i - I Zrchnsk
    • And how is the constant itself declared? - Kirill Korushkin
    • Through define ... - I Zrchnsk
    • Do you write on pure php, or is it a cms / framework? And you can change the name of the constant and try again according to my example. - Kirill Korushkin
    • On pure php and I have another constant name - I Zrchnsk