Re: [PHP] PHP short tags: Questions
On 7/14/07, Richard Lynch [EMAIL PROTECTED] wrote: You must have missed this: http://php.net/~derick/meeting-notes.html#remove-support-for-and-script-language-php-and-add-php-var Actually, yes, I did. I'll have to read through some of that stuff. Thanks for the link! Also note that, with shorthand output, the echoed output does not need a semicolon at the end if it's a single line. I generally do it out of habit, but for the purpose of illustration here, I omitted the semicolon. Additionally, a disclaimer should be made in favor of the anti-short_open_tags people, where the three lines can safely coexist on one. The omission of the semi-colon is not related in any way, shape, or form to the short open tag. It works completely independently of that. I'm well-aware of that it was for illustrative purposes and further discussion only. It also is completely irrelevant how many lines you use to type the code, nor how many lines of PHP there are. This is perfectly valid code: ?php echo 'foo' ? See above. I do not foresee this feature disappearing, personally, but I'm not involved in making that decision. While we may not be directly involved in the ultimate decision, it still doesn't hurt to mention that it's probably not a Good Idea[tm] to remove the short_open_tags option. -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP short tags: Questions
On Thu, July 12, 2007 6:42 pm, Micky Hulse wrote: I am trying to describe why php short tags failed to work on a server... here is my simplified explanation: it had to do with the server settings... The short_open_tag directive in php.ini was set to 0. Do you think that is an ok way to describe the problem to a technically literate non php coder? How technically literate are we talking here?... :-) (It's fine, just kidding.) Additionally, is there a good reference on the net that explains the differences between short open tags and normal open tags? http://php.net/ Main negative things I have read about short open tags: 1. Not as portable. 2. Security risk/less secure. 3. Will conflict with XML tags. 4. Other? #2 sounds awfully bogus to me... 1 and 3 sure ought to cover it though. -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP short tags: Questions
Hey Richard, thanks for the reply. I appreciate it. :) Richard Lynch wrote: http://php.net/ Yikes! I guess it was one of those RTFM question/answers! Lol. :D #2 sounds awfully bogus to me... Yeah... Hmm, now I am starting to wonder where I heard/read that. Maybe it was a co-worker. I am glad I asked here for clarification. 1 and 3 sure ought to cover it though. Yep yep. Sounds good to me. Good enough reasons to think twice about using short tags. Also, FYI for those interested, a list member mentioned (off-list) that shorthand tags are considered by many to be deprecated and have been on the verge of removal from the PHP language a few times in the past. Interesting stuff. :) Thanks again Richard and all. Cheers, Micky -- Wishlists: http://snipurl.com/1gqpj Switch: http://browsehappy.com/ BCC?: http://snipurl.com/w6f8 My: http://del.icio.us/mhulse -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP short tags: Questions
On 7/13/07, Micky Hulse [EMAIL PROTECTED] wrote: Hey Richard, thanks for the reply. I appreciate it. :) Richard Lynch wrote: http://php.net/ Yikes! I guess it was one of those RTFM question/answers! Lol. :D #2 sounds awfully bogus to me... Yeah... Hmm, now I am starting to wonder where I heard/read that. Maybe it was a co-worker. I am glad I asked here for clarification. 1 and 3 sure ought to cover it though. Yep yep. Sounds good to me. Good enough reasons to think twice about using short tags. Also, FYI for those interested, a list member mentioned (off-list) that shorthand tags are considered by many to be deprecated and have been on the verge of removal from the PHP language a few times in the past. Interesting stuff. :) Thanks again Richard and all. Cheers, Micky -- Wishlists: http://snipurl.com/1gqpj Switch: http://browsehappy.com/ BCC?: http://snipurl.com/w6f8 My: http://del.icio.us/mhulse -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php To my knowledge (and even a quick peek at http://www.php.net/ini.core), there is no indication that short_open_tags is deprecated, nor that it's been on the verge of removal at any point. I don't want to start a flame war, but it sounds like you've been given some bad information. In fact, removing the short_open_tags core directive would not only cause probably more than half of existing scripts to break (that's just an educated guess, of course), but would also completely eradicate the PHP core feature of shorthand output: ?php echo This is output.\n; ? versus: ?=This is output.\n? Also note that, with shorthand output, the echoed output does not need a semicolon at the end if it's a single line. I generally do it out of habit, but for the purpose of illustration here, I omitted the semicolon. Additionally, a disclaimer should be made in favor of the anti-short_open_tags people, where the three lines can safely coexist on one. -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP short tags: Questions
On Fri, July 13, 2007 8:54 am, Daniel Brown wrote: To my knowledge (and even a quick peek at http://www.php.net/ini.core), there is no indication that short_open_tags is deprecated, nor that it's been on the verge of removal at any point. I don't want to start a flame war, but it sounds like you've been given some bad information. In fact, removing the short_open_tags core directive would not only cause probably more than half of existing scripts to break (that's just an educated guess, of course), but would also completely eradicate the PHP core feature of shorthand output: You must have missed this: http://php.net/~derick/meeting-notes.html#remove-support-for-and-script-language-php-and-add-php-var This is at least one major PHP Dev Team meeting where remove short open tags was on the table... I do not know of the current status of this topic. This meeting was almost 2 years ago. The conclusion in the above URL should not be considered current, much less final. ?php echo This is output.\n; ? versus: ?=This is output.\n? Also note that, with shorthand output, the echoed output does not need a semicolon at the end if it's a single line. I generally do it out of habit, but for the purpose of illustration here, I omitted the semicolon. Additionally, a disclaimer should be made in favor of the anti-short_open_tags people, where the three lines can safely coexist on one. The omission of the semi-colon is not related in any way, shape, or form to the short open tag. It works completely independently of that. It also is completely irrelevant how many lines you use to type the code, nor how many lines of PHP there are. This is perfectly valid code: ?php echo 'foo' ? I do not foresee this feature disappearing, personally, but I'm not involved in making that decision. -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP short tags: Questions
Hi, I am trying to describe why php short tags failed to work on a server... here is my simplified explanation: it had to do with the server settings... The short_open_tag directive in php.ini was set to 0. Do you think that is an ok way to describe the problem to a technically literate non php coder? Additionally, is there a good reference on the net that explains the differences between short open tags and normal open tags? Main negative things I have read about short open tags: 1. Not as portable. 2. Security risk/less secure. 3. Will conflict with XML tags. 4. Other? Thanks! Cheers, M -- Wishlists: http://snipurl.com/1gqpj Switch: http://browsehappy.com/ BCC?: http://snipurl.com/w6f8 My: http://del.icio.us/mhulse -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP short tags: Questions
it had to do with the server settings... The short_open_tag directive in php.ini was set to 0. Do you think that is an ok way to describe the problem to a technically literate non php coder? Sure. Additionally, is there a good reference on the net that explains the differences between short open tags and normal open tags? Main negative things I have read about short open tags: 1. Not as portable. 2. Security risk/less secure. 3. Will conflict with XML tags. 1 3 definitely. No idea how it's a security risk. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP short tags: Questions
Micky Hulse wrote: Hi Chris, thanks for the quick reply. I appreciate your help. Chris wrote: Sure. Thanks. :) 1 3 definitely. No idea how it's a security risk. Ah, great. Thanks for clarification. I probably mis-read the info about it being a security risk. I should have said I'm not aware of any security risks with using short tags ;) Just to clarify. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP short tags: Questions
Hi Chris, thanks for the quick reply. I appreciate your help. Chris wrote: Sure. Thanks. :) 1 3 definitely. No idea how it's a security risk. Ah, great. Thanks for clarification. I probably mis-read the info about it being a security risk. Have a great day, Cheers, Micky -- Wishlists: http://snipurl.com/1gqpj Switch: http://browsehappy.com/ BCC?: http://snipurl.com/w6f8 My: http://del.icio.us/mhulse -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php