Help with what this does

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
veldthui
Forum Newbie
Posts: 10
Joined: Tue Oct 14, 2008 4:10 pm

Help with what this does

Post by veldthui »

I am going through and converting some php code to remove the short version of <? and changing to <?php. Most are <?= which I know is replaced with <?php echo but I have some which are just as <? } ?>. This is amongst the HTML code. Any idea what this actually does?

--
John Veldthuis
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Help with what this does

Post by requinix »

It's the same as

Code: Select all

<?php } ?>
Somewhere there is a matching {.
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Help with what this does

Post by jackpf »

Bit off topic...but why are you converting all short-tags? They can be pretty useful in certain cases...
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: Help with what this does

Post by califdon »

jackpf wrote:Bit off topic...but why are you converting all short-tags? They can be pretty useful in certain cases...
Those certain cases being when your server is configured for short tags and you know with absolute certainty that your scripts will never, ever run on any other server...? :wink:
User avatar
Mirge
Forum Contributor
Posts: 298
Joined: Thu Sep 03, 2009 11:39 pm

Re: Help with what this does

Post by Mirge »

califdon wrote:
jackpf wrote:Bit off topic...but why are you converting all short-tags? They can be pretty useful in certain cases...
Those certain cases being when your server is configured for short tags and you know with absolute certainty that your scripts will never, ever run on any other server...? :wink:
That's the case with my software lol... custom code written for specific clients, not redistributed code. Naturally this isn't the case with everybdy :)
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Help with what this does

Post by jackpf »

califdon wrote:
jackpf wrote:Bit off topic...but why are you converting all short-tags? They can be pretty useful in certain cases...
Those certain cases being when your server is configured for short tags and you know with absolute certainty that your scripts will never, ever run on any other server...? :wink:
Exactly :P

But most hosting companys' servers have them turned on anyways...
And if it's your own code, then HOPEFULLY you'll be the only one running it. God forbid someone else manages to...
Post Reply