<? PHP vs. <?

This is a discussion on <? PHP vs. <? within the PHP forums in Programming Languages category; Alex Black wrote: > xml problems? > > _what_ xml problems? <?xml is considered a short-tag or something like that. Wagner -- One maniac alone can do what 20 together cannot...

Go Back   Application Development Forum > Programming Languages > PHP

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #11  
Old 01-18-2001, 03:37 PM
Alexander Wagner
Guest
 
Default Re: [PHP] <? PHP vs. <?

Alex Black wrote:
> xml problems?
>
> _what_ xml problems?


<?xml is considered a short-tag or something like that.

Wagner

--
One maniac alone can do what 20 together cannot
Reply With Quote
  #12  
Old 01-18-2001, 03:41 PM
Alex Black
Guest
 
Default Re: [PHP] <? PHP vs. <?

xml problems?

_what_ xml problems?

_alex


--
Alex Black, Head Monkey
enigma@turingstudio.com

The Turing Studio, Inc.
http://www.turingstudio.com

vox+510.666.0074
fax+510.666.0093

Saul Zaentz Film Center
2600 Tenth St Suite 433
Berkeley, CA 94710-2522




> From: teo@digiro.net (Teodor Cimpoesu)
> Organization: DIGICOM, Romania
> Newsgroups: php.general
> Date: 17 Jan 2001 12:57:37 -0800
> Subject: 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.
>
> --
> 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
  #13  
Old 01-18-2001, 03:46 PM
eschmid+sic@s.netic.de
Guest
 
Default Re: [PHP] <? PHP vs. <?

On Thu, Jan 18, 2001 at 09:37:55PM +0100, Alexander Wagner wrote:
> Alex Black wrote:
> > xml problems?
> >
> > _what_ xml problems?

>
> <?xml is considered a short-tag or something like that.


No, <? is the short opening tag and is only valid for PHP with the short
open tag enabled in php.ini.

-Egon

--
http://www.linuxtag.de/
http://php.net/books.php
http://www.concert-band.de/
mailto:linuxtag-subscribe@php-homepage.de
Reply With Quote
  #14  
Old 01-18-2001, 03:51 PM
Alexander Wagner
Guest
 
Default Re: [PHP] <? PHP vs. <?

eschmid+sic@s.netic.de wrote:
> > > xml problems?
> > >
> > > _what_ xml problems?

> >
> > <?xml is considered a short-tag or something like that.

>
> No, <? is the short opening tag and is only valid for PHP with the short
> open tag enabled in php.ini.


I meant that with short-tags on, <?xml will be considered a short-Tag,
because it begins like one, although it's just plain XML and has nothing to
do with PHP.

Wagner

--
One maniac alone can do what 20 together cannot
Reply With Quote
  #15  
Old 01-18-2001, 04:01 PM
eschmid+sic@s.netic.de
Guest
 
Default Re: [PHP] <? PHP vs. <?

On Thu, Jan 18, 2001 at 09:51:52PM +0100, Alexander Wagner wrote:
> eschmid+sic@s.netic.de wrote:
> > > > xml problems?
> > > >
> > > > _what_ xml problems?
> > >
> > > <?xml is considered a short-tag or something like that.

> >
> > No, <? is the short opening tag and is only valid for PHP with the short
> > open tag enabled in php.ini.

>
> I meant that with short-tags on, <?xml will be considered a short-Tag,
> because it begins like one, although it's just plain XML and has nothing to
> do with PHP.


<? short open tag for PHP
<?php open tag for PHP
<?xml open tag for XML

And for all three cases the closing tag is ?>.

-Egon

--
http://www.linuxtag.de/
http://php.net/books.php
http://www.concert-band.de/
mailto:linuxtag-subscribe@php-homepage.de
Reply With Quote
  #16  
Old 01-18-2001, 04:02 PM
Alexander Wagner
Guest
 
Default Re: [PHP] <? PHP vs. <?

eschmid+sic@s.netic.de wrote:
> <? short open tag for PHP
> <?php open tag for PHP
> <?xml open tag for XML
>
> And for all three cases the closing tag is ?>.


Wasn't there a thread on PHP-DEV about the PHP-parser mistaking <?xml for a
short-Tag (for <?xml would be valid PHP like <?echo $var?>).

Got my point?

Wagner

--
One maniac alone can do what 20 together cannot
Reply With Quote
  #17  
Old 01-18-2001, 04:21 PM
eschmid+sic@s.netic.de
Guest
 
Default Re: [PHP] <? PHP vs. <?

On Thu, Jan 18, 2001 at 10:02:42PM +0100, Alexander Wagner wrote:
> eschmid+sic@s.netic.de wrote:
> > <? short open tag for PHP
> > <?php open tag for PHP
> > <?xml open tag for XML
> >
> > And for all three cases the closing tag is ?>.

>
> Wasn't there a thread on PHP-DEV about the PHP-parser mistaking <?xml for a
> short-Tag (for <?xml would be valid PHP like <?echo $var?>).
>
> Got my point?


No, there was a discussion if we should disable the short open tag (<?) in
php.ini by default. But that would break the most PHP scripts. But anyway
you should use the always allowed long open tag for portable code and the
benefit of it would be, you can mix PHP with XML. Another point is, if you
move your scripts to a ISP who have disabled short open tags, your scripts
wouldn't work anymore. The normal open tag was discussed in 1997 and was
choosen with XML in mind.

-Egon

--
http://www.linuxtag.de/
http://php.net/books.php
http://www.concert-band.de/
mailto:linuxtag-subscribe@php-homepage.de
Reply With Quote
  #18  
Old 01-18-2001, 05:04 PM
Michael Talbot-Wilson
Guest
 
Default Re: [PHP] <? PHP vs. <?

Ye 2001-01-18 21:46 +0100, eschmid+sic@s.netic.de skribis:

> On Thu, Jan 18, 2001 at 09:37:55PM +0100, Alexander Wagner wrote:
> > Alex Black wrote:
> > > xml problems?
> > >
> > > _what_ xml problems?

> >
> > <?xml is considered a short-tag or something like that.

>
> No, <? is the short opening tag and is only valid for PHP with the short
> open tag enabled in php.ini.


If you enable it and use it, does it work with (otherwise) valid
xhtml?


Reply With Quote
  #19  
Old 01-18-2001, 06:07 PM
Toby Butzon
Guest
 
Default Re: [PHP] <? PHP vs. <?

Has using <?[space] instead of just <? as the short tag been discussed?

--Toby

----- Original Message -----
From: <eschmid+sic@s.netic.de>
To: "Alexander Wagner" <wagner@globalpark.de>; <php-general@lists.php.net>
Sent: Thursday, January 18, 2001 4:21 PM
Subject: Re: [php] <? PHP vs. <?


> On Thu, Jan 18, 2001 at 10:02:42PM +0100, Alexander Wagner wrote:
> > eschmid+sic@s.netic.de wrote:
> > > <? short open tag for PHP
> > > <?php open tag for PHP
> > > <?xml open tag for XML
> > >
> > > And for all three cases the closing tag is ?>.

> >
> > Wasn't there a thread on PHP-DEV about the PHP-parser mistaking <?xml

for a
> > short-Tag (for <?xml would be valid PHP like <?echo $var?>).
> >
> > Got my point?

>
> No, there was a discussion if we should disable the short open tag (<?)

in
> php.ini by default. But that would break the most PHP scripts. But anyway
> you should use the always allowed long open tag for portable code and the
> benefit of it would be, you can mix PHP with XML. Another point is, if

you
> move your scripts to a ISP who have disabled short open tags, your

scripts
> wouldn't work anymore. The normal open tag was discussed in 1997 and was
> choosen with XML in mind.
>
> -Egon
>
> --
> http://www.linuxtag.de/
> http://php.net/books.php
> http://www.concert-band.de/
> mailto:linuxtag-subscribe@php-homepage.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
  #20  
Old 01-18-2001, 06:14 PM
Shawn Blaylock
Guest
 
Default Re: [PHP] <? PHP vs. <?

It's my understanding that whitespace is ignored. I could be wrong here,
though.

--Shawn

Toby Butzon wrote:
>
> Has using <?[space] instead of just <? as the short tag been discussed?
>
> --Toby
>
> ----- Original Message -----
> From: <eschmid+sic@s.netic.de>
> To: "Alexander Wagner" <wagner@globalpark.de>; <php-general@lists.php.net>
> Sent: Thursday, January 18, 2001 4:21 PM
> Subject: Re: [php] <? PHP vs. <?
>
> > On Thu, Jan 18, 2001 at 10:02:42PM +0100, Alexander Wagner wrote:
> > > eschmid+sic@s.netic.de wrote:
> > > > <? short open tag for PHP
> > > > <?php open tag for PHP
> > > > <?xml open tag for XML
> > > >
> > > > And for all three cases the closing tag is ?>.
> > >
> > > Wasn't there a thread on PHP-DEV about the PHP-parser mistaking <?xml

> for a
> > > short-Tag (for <?xml would be valid PHP like <?echo $var?>).
> > >
> > > Got my point?

> >
> > No, there was a discussion if we should disable the short open tag (<?)

> in
> > php.ini by default. But that would break the most PHP scripts. But anyway
> > you should use the always allowed long open tag for portable code and the
> > benefit of it would be, you can mix PHP with XML. Another point is, if

> you
> > move your scripts to a ISP who have disabled short open tags, your

> scripts
> > wouldn't work anymore. The normal open tag was discussed in 1997 and was
> > choosen with XML in mind.
> >
> > -Egon
> >
> > --
> > http://www.linuxtag.de/
> > http://php.net/books.php
> > http://www.concert-band.de/
> > mailto:linuxtag-subscribe@php-homepage.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
> >
> >

>
> --
> 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


--

Shawn Blaylock, ClipperNet Software Engineer
shawnb@clipper.net
http://www.clipper.net/
Eugene OR 541-431-3360 x406
Toll Free 866-673-6260 x406
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 08:47 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.