4

hi i saw there are four types of tags using in php .

<?php

?>

and

<?

?>

and

<script language=“php”>

</script>

and

<%

%>

and only the first one is using and others are deprecated .

i want to know the major advantages and disadvantages of each . and want to know why the 2 ,3 ,4 ones are deprecated .

BoltClock
  • 700,868
  • 160
  • 1,392
  • 1,356
Kanishka Panamaldeniya
  • 17,302
  • 31
  • 123
  • 193
  • 2
    There's no advantages to using deprecated features... sooner or later you'll probably trip over an issue using them. The second example is probably the most widely used outside of the first, and migrate a script with short tags to a server where they're disabled is a pain. » http://stackoverflow.com/questions/200640/are-php-short-tags-acceptable-to-use – Ben Everard Aug 02 '11 at 08:46
  • 7

2 Answers2

2
  1. Normal php tags
  2. XML tags
  3. HTML tags
  4. ASP tags

I think the disadvantage of deprecated tags is that they are common in other languages too, not only php.

0

They are going to be deprecated in php6

Because these php short tags are not supported on all servers