<? PHP vs. <?

This is a discussion on <? PHP vs. <? within the PHP forums in Programming Languages category; Is PHP the implied script, so that it is okay to begin PHP code like this <? vs. like this <?php When is it not implied? *wow, some real beginer questions! eh?*...

Go Back   Application Development Forum > Programming Languages > PHP

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 01-17-2001, 01:32 PM
Karl J. Stubsjoen
Guest
 
Default <? PHP vs. <?

Is PHP the implied script, so that it is okay to begin PHP code like this <?
vs. like this <?php
When is it not implied?

*wow, some real beginer questions! eh?*

Reply With Quote
  #2  
Old 01-17-2001, 01:51 PM
Egon Schmid
Guest
 
Default Re: [PHP] <? PHP vs. <?

"Karl J. Stubsjoen" wrote:
>
> Is PHP the implied script, so that it is okay to begin PHP code like this <?
> vs. like this <?php
> When is it not implied?


You should use <?php. In future versions the open short tag would be
dropped or your administrator can disable the open short tag.

-Egon

--
SIX Offene Systeme GmbH · Stuttgart - Berlin - New York
Sielminger Straße 63 · D-70771 Leinfelden-Echterdingen
Fon +49 711 9909164 · Fax +49 711 9909199 http://www.six.de
Reply With Quote
  #3  
Old 01-17-2001, 01:54 PM
Romulo Roberto Pereira
Guest
 
Default Re: [PHP] <? PHP vs. <?

I didn't know that - very intersting!!!!! thank you Egon, this reaaly
helps...

Rom
----- Original Message -----
From: Egon Schmid (@work) <eschmid@php.net>
To: Karl J. Stubsjoen <karlflips@kstub.com>
Cc: PHP Mailing List <php-general@lists.php.net>
Sent: Wednesday, January 17, 2001 1:51 PM
Subject: Re: [php] <? PHP vs. <?


"Karl J. Stubsjoen" wrote:
>
> Is PHP the implied script, so that it is okay to begin PHP code like this

<?
> vs. like this <?php
> When is it not implied?


You should use <?php. In future versions the open short tag would be
dropped or your administrator can disable the open short tag.

-Egon

--
SIX Offene Systeme GmbH · Stuttgart - Berlin - New York
Sielminger Straße 63 · D-70771 Leinfelden-Echterdingen
Fon +49 711 9909164 · Fax +49 711 9909199 http://www.six.de

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net

Reply With Quote
  #4  
Old 01-17-2001, 01:54 PM
Rasmus Lerdorf
Guest
 
Default Re: [PHP] <? PHP vs. <?

> > Is PHP the implied script, so that it is okay to begin PHP code like this <?
> > vs. like this <?php
> > When is it not implied?

>
> You should use <?php. In future versions the open short tag would be
> dropped or your administrator can disable the open short tag.


Well, I don't see the short tag ever being dropped actually. But yes,
<?php would be best for writing code meant to be portable.

-Rasmus

Reply With Quote
  #5  
Old 01-17-2001, 01:54 PM
Toby Butzon
Guest
 
Default Re: [PHP] <? PHP vs. <?

> > Is PHP the implied script, so that it is okay to begin PHP code like
this <?
> > vs. like this <?php
> > When is it not implied?

>
> You should use <?php. In future versions the open short tag would be
> dropped or your administrator can disable the open short tag.


Are there in fact plans to drop the short tags?

--Toby


Reply With Quote
  #6  
Old 01-17-2001, 02:48 PM
Michael Talbot-Wilson
Guest
 
Default Re: [PHP] <? PHP vs. <?

Ye 2001-01-17 13:54 -0500, Toby Butzon skribis:

> > > Is PHP the implied script, so that it is okay to begin PHP code like

> this <?
> > > vs. like this <?php
> > > When is it not implied?

> >
> > You should use <?php. In future versions the open short tag would be
> > dropped or your administrator can disable the open short tag.

>
> Are there in fact plans to drop the short tags?


Short open tags won't work with xml. Therefore they won't work with
xhtml. They conflict with where the Web is going.

Thus, they have already been dropped. You don't _need_ them. Stay
away from them.


Reply With Quote
  #7  
Old 01-17-2001, 03:32 PM
Philip Olson
Guest
 
Default Re: [PHP] <? PHP vs. <?


> Short open tags won't work with xml. Therefore they won't work with
> xhtml. They conflict with where the Web is going.


Aha! Yet another reason not to use <?=

:-)

philip

On Thu, 18 Jan 2001, Michael Talbot-Wilson wrote:

> Ye 2001-01-17 13:54 -0500, Toby Butzon skribis:
>
> > > > Is PHP the implied script, so that it is okay to begin PHP code like

> > this <?
> > > > vs. like this <?php
> > > > When is it not implied?
> > >
> > > You should use <?php. In future versions the open short tag would be
> > > dropped or your administrator can disable the open short tag.

> >
> > Are there in fact plans to drop the short tags?

>
> Short open tags won't work with xml. Therefore they won't work with
> xhtml. They conflict with where the Web is going.
>
> Thus, they have already been dropped. You don't _need_ them. Stay
> away from them.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>


Reply With Quote
  #8  
Old 01-17-2001, 03:59 PM
Teodor Cimpoesu
Guest
 
Default Re: [PHP] <? PHP vs. <?

Hi Philip!
On Wed, 17 Jan 2001, Philip Olson wrote:

>
> > Short open tags won't work with xml. Therefore they won't work with
> > xhtml. They conflict with where the Web is going.

>
> Aha! Yet another reason not to use <?=
>
> :-)
>

you can always use <% and <%= instead.
No XML problems, and you may confuse your {A,J}SP coders

-- teodor.
Reply With Quote
  #9  
Old 01-17-2001, 06:22 PM
Thomas Deliduka
Guest
 
Default Re: [PHP] <? PHP vs. <?

You know, this means that ALL of my hundreds of pages over multiple sites
would break. That's really sad.

I just think it's hard (to remember) when I have code like:

<A HREF="filename.php?var=<? echo $thevar ?>">this link</A>

to put in the 'php' there. It's so much easier just to code with short tags.

(although I have a program that can work in every app that will trap <? and
replace it with <?php everytime I type it. I could utilize that. (I love
Macs... and Spell Catcher.)

On 1/17/01 2:48 PM this was written:

> Ye 2001-01-17 13:54 -0500, Toby Butzon skribis:
>
>>>> Is PHP the implied script, so that it is okay to begin PHP code like

>> this <?
>>>> vs. like this <?php
>>>> When is it not implied?
>>>
>>> You should use <?php. In future versions the open short tag would be
>>> dropped or your administrator can disable the open short tag.

>>
>> Are there in fact plans to drop the short tags?

>
> Short open tags won't work with xml. Therefore they won't work with
> xhtml. They conflict with where the Web is going.
>
> Thus, they have already been dropped. You don't _need_ them. Stay
> away from them.


--

Thomas Deliduka
IT Manager
-------------------------
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.com/


Reply With Quote
  #10  
Old 01-17-2001, 06:23 PM
Rasmus Lerdorf
Guest
 
Default Re: [PHP] <? PHP vs. <?

> You know, this means that ALL of my hundreds of pages over multiple sites
> would break. That's really sad.


It won't happen.

-Rasmus

Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 10:34 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.