Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » PHP
  • » [PHP-DEV] <?xml tags (was PDM Meeting Notes) [RSS Feed]

#1 Nov. 27, 2005 21:25:14

Daniel C.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] <?xml tags (was PDM Meeting Notes)


Hi Marcus:

On Sun, Nov 27, 2005 at 11:58:16AM +0100, Marcus Boerger wrote:
>
> To second this, the xml standard allows any name after '<?' as processing
> instruction. Widely in use is for example '<?jsp' and do you want to start
> special treatment for java stuff in PHP? ;-)

First, PHP scripts are not XML files, so why are we concerned with what
the XML standard says?

Second, PHP is frequently used to output XML files, necessitating such PHP
scripts contain the string "<?xml" in them. But in order to ensure
scripts work when short tags is on, one must write something contorted
like:

echo '<' . '?xml ...';

Third, if someone wrote a script using "<?xml" with short tags off instead
of the above, PHP needlessly fails if short tags is on, eliminating
portability.

--Dan

--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programminghttp://www.AnalysisAndSolutions.com/4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

#2 Nov. 27, 2005 21:33:46

Johannes S.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] <?xml tags (was PDM Meeting Notes)


Hi,

On Sunday 27 November 2005 22:20, Daniel Convissor wrote:
> First, PHP scripts are not XML files, so why are we concerned with what
> the XML standard says?

It isn't about the XML standard but about exceptions for the PHP parser and
why should <?xml be treated different from <?jsp or <?xsl or <?foo or ...
which all are used (hm, not sure about <?foo) and sometimes even in
combination with PHP.

> Second, PHP is frequently used to output XML files, necessitating such PHP
> scripts contain the string "<?xml" in them. But in order to ensure
> scripts work when short tags is on, one must write something contorted
> like:
>
> echo '<' . '?xml ...';

echo '<?xml ...';

just works fine.

> Third, if someone wrote a script using "<?xml" with short tags off instead
> of the above, PHP needlessly fails if short tags is on, eliminating
> portability.

so just remove short_tags :-)

johannes

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

#3 Nov. 27, 2005 21:41:28

Matthew C.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] <?xml tags (was PDM Meeting Notes)


On Sun, 2005-11-27 at 22:32 +0100, Johannes Schlueter wrote:
> It isn't about the XML standard but about exceptions for the PHP parser and
> why should <?xml be treated different from <?jsp or <?xsl or <?foo or ...
> which all are used (hm, not sure about <?foo) and sometimes even in
> combination with PHP.

I recall this being discussed before, but not what came of it: is there
a problem with just ignoring <?foo where foo is anything other than php
or =? <?foo or <?bar or <?whatever is a parse error anyway so I very
much doubt there's any BC break. Unless someone's program relies on
parse errors.

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

#4 Nov. 27, 2005 22:50:03

Sara G.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] <?xml tags (was PDM Meeting Notes)


I recall this being discussed before, but not what came of it: is there
a problem with just ignoring <?foo where foo is anything other than php
or =? <?foo or <?bar or <?whatever is a parse error anyway so I very
much doubt there's any BC break. Unless someone's program relies on
parse errors.The problem there becomes legacy support for:

<?foo();?>

And before you say "just watch for parens" there's also:

<?foo::bar();?>

and a much more insiduous example:

<?die ?>no semicolon, no parens, no paamayim nekudotayim, nothing but a perfectlyvalid looking PI tag.-Sara--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

#5 Nov. 28, 2005 08:58:06

Bastian G.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] <?xml tags (was PDM Meeting Notes)


What concerns me most is that <?php= does not work, regardless if shorttags will be disabled or not in php6. I currently use <%= to counterthis, but I am most certainly *not* happy with it.So a clean <?php= solution would be ideal, so I wouldn't have to careabout xml/xsl files parsed and neither about my templates growing toolarge because of php overhead.Sara Golemon wrote:I recall this being discussed before, but not what came of it: is there
a problem with just ignoring <?foo where foo is anything other than php
or =? <?foo or <?bar or <?whatever is a parse error anyway so I very
much doubt there's any BC break. Unless someone's program relies on
parse errors.The problem there becomes legacy support for:

<?foo();?>

And before you say "just watch for parens" there's also:

<?foo::bar();?>

and a much more insiduous example:

<?die ?>no semicolon, no parens, no paamayim nekudotayim, nothing but aperfectly valid looking PI tag.-Sara--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

#6 Nov. 28, 2005 19:33:15

Marcus B.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] <?xml tags (was PDM Meeting Notes)


Hello Bastian,

id like to see '<?php=' too.

marcus

Monday, November 28, 2005, 9:56:56 AM, you wrote:

> What concerns me most is that <?php= does not work, regardless if short
> tags will be disabled or not in php6. I currently use <%= to counter
> this, but I am most certainly *not* happy with it.

> So a clean <?php= solution would be ideal, so I wouldn't have to care
> about xml/xsl files parsed and neither about my templates growing too
> large because of php overhead.

> Sara Golemon wrote:
>>> I recall this being discussed before, but not what came of it: is there
>>> a problem with just ignoring <?foo where foo is anything other than php
>>> or =? <?foo or <?bar or <?whatever is a parse error anyway so I very
>>> much doubt there's any BC break. Unless someone's program relies on
>>> parse errors.
>>>
>> The problem there becomes legacy support for:
>>
>> <?foo();?>
>>
>> And before you say "just watch for parens" there's also:
>>
>> <?foo::bar();?>
>>
>> and a much more insiduous example:
>>
>> <?die ?>
>>
>> no semicolon, no parens, no paamayim nekudotayim, nothing but a
>> perfectly valid looking PI tag.
>>
>> -Sara




Best regards,
Marcus

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

#7 Nov. 28, 2005 20:28:20

Ron K.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] <?xml tags (was PDM Meeting Notes)


me too, i've asked for this before but i remember it being laughed away...

ron


"Marcus Boerger" <> wrote in message

> Hello Bastian,
>
> id like to see '<?php=' too.
>
> marcus
>
> Monday, November 28, 2005, 9:56:56 AM, you wrote:
>
> > What concerns me most is that <?php= does not work, regardless if short
> > tags will be disabled or not in php6. I currently use <%= to counter
> > this, but I am most certainly *not* happy with it.
>
> > So a clean <?php= solution would be ideal, so I wouldn't have to care
> > about xml/xsl files parsed and neither about my templates growing too
> > large because of php overhead.
>
> > Sara Golemon wrote:
> >>> I recall this being discussed before, but not what came of it: is
there
> >>> a problem with just ignoring <?foo where foo is anything other than
php
> >>> or =? <?foo or <?bar or <?whatever is a parse error anyway so I very
> >>> much doubt there's any BC break. Unless someone's program relies on
> >>> parse errors.
> >>>
> >> The problem there becomes legacy support for:
> >>
> >> <?foo();?>
> >>
> >> And before you say "just watch for parens" there's also:
> >>
> >> <?foo::bar();?>
> >>
> >> and a much more insiduous example:
> >>
> >> <?die ?>
> >>
> >> no semicolon, no parens, no paamayim nekudotayim, nothing but a
> >> perfectly valid looking PI tag.
> >>
> >> -Sara
>
>
>
>
> Best regards,
> Marcus

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

#8 Nov. 30, 2005 09:33:04

Mike H.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] <?xml tags (was PDM Meeting Notes)


Just FYI, the lack of <?php= is the only reason we don't disable short
tags on all development projects at my company.

Mike

On Mon, 28 Nov 2005 20:29:42 +0100
Marcus Boerger <> wrote:

> Hello Bastian,
>
> id like to see '<?php=' too.
>
> marcus
>
> Monday, November 28, 2005, 9:56:56 AM, you wrote:
>
> > What concerns me most is that <?php= does not work, regardless if short
> > tags will be disabled or not in php6. I currently use <%= to counter
> > this, but I am most certainly *not* happy with it.
>
> > So a clean <?php= solution would be ideal, so I wouldn't have to care
> > about xml/xsl files parsed and neither about my templates growing too
> > large because of php overhead.
>
> > Sara Golemon wrote:
> >>> I recall this being discussed before, but not what came of it: is there
> >>> a problem with just ignoring <?foo where foo is anything other than php
> >>> or =? <?foo or <?bar or <?whatever is a parse error anyway so I very
> >>> much doubt there's any BC break. Unless someone's program relies on
> >>> parse errors.
> >>>
> >> The problem there becomes legacy support for:
> >>
> >> <?foo();?>
> >>
> >> And before you say "just watch for parens" there's also:
> >>
> >> <?foo::bar();?>
> >>
> >> and a much more insiduous example:
> >>
> >> <?die ?>
> >>
> >> no semicolon, no parens, no paamayim nekudotayim, nothing but a
> >> perfectly valid looking PI tag.
> >>
> >> -Sara
>
>
>
>
> Best regards,
> Marcus
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit:http://www.php.net/unsub.phpMike Hall
Twist Digital Media
e.

D I S C L A I M E R
Statements and opinions expressed in this e-mail may not represent those
of the company.

The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you
received this in error, please contact the sender immediately and delete
the material from any computer.

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

#9 Nov. 30, 2005 09:48:58

Hartmut H.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] <?xml tags (was PDM Meeting Notes)


Mike Hall wrote:Just FYI, the lack of <?php= is the only reason we don't disable short
tags on all development projects at my company.as far as i remember the only arguemnt against <?php= was
that '=' is not a valid character for a XML processing instruction
name?


--
Hartmut Holzgraefe, Senior Support Engineer .
MySQL AB, www.mysql.com

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

#10 Nov. 30, 2005 17:21:21

Jason G.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] <?xml tags (was PDM Meeting Notes)


Hello Mike,

Same at my company.

<?php= would be very nice.

--
Best regards,
Jason

Wednesday, November 30, 2005, 4:31:58 AM, you wrote:

MH> Just FYI, the lack of <?php= is the only reason we don't disable short
MH> tags on all development projects at my company.

MH> Mike

MH> On Mon, 28 Nov 2005 20:29:42 +0100
MH> Marcus Boerger <> wrote:

>> Hello Bastian,
>>
>> id like to see '<?php=' too.
>>
>> marcus
>>
>> Monday, November 28, 2005, 9:56:56 AM, you wrote:
>>
>> > What concerns me most is that <?php= does not work, regardless if short
>> > tags will be disabled or not in php6. I currently use <%= to counter
>> > this, but I am most certainly *not* happy with it.
>>
>> > So a clean <?php= solution would be ideal, so I wouldn't have to care
>> > about xml/xsl files parsed and neither about my templates growing too
>> > large because of php overhead.
>>
>> > Sara Golemon wrote:
>> >>> I recall this being discussed before, but not what came of it: is there
>> >>> a problem with just ignoring <?foo where foo is anything other than php
>> >>> or =? <?foo or <?bar or <?whatever is a parse error anyway so I very
>> >>> much doubt there's any BC break. Unless someone's program relies on
>> >>> parse errors.
>> >>>
>> >> The problem there becomes legacy support for:
>> >>
>> >> <?foo();?>
>> >>
>> >> And before you say "just watch for parens" there's also:
>> >>
>> >> <?foo::bar();?>
>> >>
>> >> and a much more insiduous example:
>> >>
>> >> <?die ?>
>> >>
>> >> no semicolon, no parens, no paamayim nekudotayim, nothing but a
>> >> perfectly valid looking PI tag.
>> >>
>> >> -Sara
>>
>>
>>
>>
>> Best regards,
>> Marcus
>>
>> --
>> PHP Internals - PHP Runtime Development Mailing List
>> To unsubscribe, visit:http://www.php.net/unsub.phpMH> Mike Hall
MH> Twist Digital Media
MH> e.

MH> D I S C L A I M E R
MH> Statements and opinions expressed in this e-mail may not represent those
MH> of the company.

MH> The information transmitted is intended only for the person or entity to
MH> which it is addressed and may contain confidential and/or privileged
MH> material. Any review, retransmission, dissemination or other use of, or
MH> taking of any action in reliance upon, this information by persons or
MH> entities other than the intended recipient is prohibited. If you
MH> received this in error, please contact the sender immediately and delete
MH> the material from any computer.

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

  • Root
  • » PHP
  • » [PHP-DEV] <?xml tags (was PDM Meeting Notes) [RSS Feed]

Board footer

Moderator control

Enjoy the 23rd of April
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support