R: difference between <?php and <?
| From: | --- | Date: | Mon, 10 Sep 2001 14:15:33 +0000 |
| Subject: | R: difference between <?php and <? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-66748@lists.php.net to get a copy of this message | ||
if you know the xml language, you notice that all tags that start with <?
are called processing-istructions tags, and the word that follow the
question mark is the TARGET of the following istructions.
This is an example of xml file:
<?xml version="1.0"?>
<?cocoon-process ....?>
<?mypersonalprogram
myistructions;
?>
<?php
myphpfunction();
?>
<tag>my text</tag>
etc.....
between <?php and <? there are no differences, but you should use the
extended form (<?php) if you want that your code is more portable and
reusable, in fact, you can't use <? alone in an xml file, the xml parser
don't let you do that.
--------------------------
Federico
flagzenNO-SPAM@libero.it
--------------------------
Php Guy <php_guy@ns.visors.com.hk> wrote in message
Pine.LNX.4.21.0109100236160.2486-100000@ns.visors.com.hk...
> Hi,
>
> I am a newbie at this PHP thing and I have been working from information
> on the web and from books.
>
> I noticed that some start the PHP script with <? and some start with
> <?php. Actually I have noticed that one of the first PHP script in my
> book uses both methods interchangeably.
>
> Is there a real difference between the two?
>
> Or maybe I just haven't noticed something.
>
> Peter
>