RE: [PHP] '<?=' History / Info request
| From: | Philip Olson | Date: | Fri, 17 Nov 2000 05:25:11 +0000 |
| Subject: | RE: [PHP] '<?=' History / Info request | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-25872@lists.php.net to get a copy of this message | ||
Hey Lawrence et al-
I understand what a short tag is :
<? vs. <?php
And I understand that <?= is essentially <? echo which indirectly makes
<?= a short tag, right? Basically. That is not my question but rather it
is involving the history of <?= in many ways, not just its relation with
short tags -- that was only part of it. And the two are indeed related,
indirectly. Btw, the reasoning of the relationship of <?= and <? as a
short tag just hit me, I only heard this before but did not think of why.
Anyway...
So, I would appreciate someone who knows the history of this to report on
my iniatial question and not explain the uses of the aforementioned tags.
Fact of the matter is <?= has not always been available and I am wanting
to know when it was "created" , and how or when I can use it so the
entire world will understand and parse my code. And I suppose point out
that it was not at all documented but that is already known by many.
Thanks for the info though :-) We're just miscommunicating.
Philip
--
be outside the box.
On Fri, 17 Nov 2000 Lawrence.Sheed@dfait-maeci.gc.ca wrote:
> You are mixing 2 things Philip.
>
> <? ?> is short tag form for <?php ?>
>
> If you <?='dfdf';?> you are essentially putting code immediately after your
> opening tag.
> eg
> <?echo 'stuff'?>
> <?$a=$b?>
> <?phpinfo()?>
> are also all valid.
>
> This does not mean that there is suddenly a new command called <?=
> its just that its parsing <?= to mean
> Start PHP Code, echo whatever
>
> Note, if you use <?php ?> form, you must leave a space after the <?php,
> because the parser has no way of knowing if you mean <?php or another
> arbitrary tag.
>
> Always use <?php ?> form. If you have asp on your server as well, you could
> use
>
> <?asp ?>
>
> <?php ?>
>
> as valid formats, if you used <? ?> form, then you won't know what parser is
> running the code. (until it runs it with the wrong one and belches loudly
> all over the web browser!).
>
> Cheers,
>
> Lawrence.