Difference from php’s initial tag

Asked

Viewed 14 times

1

Recently I have explored many codes related to php, scripts, queries etc, but I came across one thing!

In the initial php tag the user put the default:

<?php echo('test md5:' . md5_file('index.php'); ?>

but after opening / closed the php tag the comrade started another tag, I unfortunately do not know!

<? include('score.php'); ?>

And what’s the difference between <?php ?> and <? ?> ?

  • 2

    It’s just a way to abbreviate... there are servers that accept this abbreviation where the "short open tags" option is enabled. But I do not advise abbreviating this way. If any server does not accept problems may occur.

  • Reply to mark as answered!

  • 2

    The ideal is not to use. It has the same effect of <?php, but it may conflict with XML statements and statements. To get to know these and the short echo tag, see the link post above. As we already have several answers talking about this, the closure serves to concentrate all solutions in one place, and your question is useful as indexing mechanism for more people to find this information.

  • Interesting! I’m a beginner and I came across this difference and I was a little lost!

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.