I was simply going through the tutorial of PHP there I found that we can write our PHP code using <script language="php"></script> tag also, and I was trying to figure out the difference between this and <?php ?> tag and advantages or disadvantages but didn’t found anything, can anyone tell me the difference please.
Thanks in advance.
I think, in terms of semantics there is no advantages or disadvantages. According to PHP manual:
Also, note that:
Anyway, the
<?php ?>is the most commonly used and recommended to use it.NOTE: Script tags
<script language="php"></script>and ASP tags<% %>are removed from PHP 7.