• We have own PHP framework. Frontend HTML generated by PHP templates on fly. Some PHP templates include JavaScript. But not static. JavaScript variables can be placed by PHP inclusions into my website(URL = https://tinyurl.com/ms6pu9k4 ).

    <script>var lat = <?= $lat</script>
    When we trying to minify this code via build-in tools (uglyfyjs) I get error

    ERROR: Unexpected token: operator ?<?

    Is there any ability to avoid this error by ignoring the PHP code?

  • The topic ‘How to minify JavaScript with PHP includes in PhpStorm?’ is closed to new replies.