<? not working in latest PHP version ?

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
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

<? not working in latest PHP version ?

Post by anjanesh »

Hi

When did PHP start not allowing <? tags but only <?php ?
I was using PHP 5.0.x and it was all fine when many of my scripts failed because after updating tp PHP 5.1.4.
User avatar
MrPotatoes
Forum Regular
Posts: 617
Joined: Wed May 24, 2006 6:42 am

Post by MrPotatoes »

it's your server.

just stop doing that
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Short tags have been turned off and are being removed.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: <? not working in latest PHP version ?

Post by RobertGonzalez »

anjanesh wrote:Hi

When did PHP start not allowing <? tags but only <?php ?
I was using PHP 5.0.x and it was all fine when many of my scripts failed because after updating tp PHP 5.1.4.
The topic of PHP 'short tags' is touched on rather regularly around here. The question invariably comes up... What happens if PHP removes support for short tags?

Now you know. I think this applies (in like manner) to using register globals as well.
User avatar
daedalus__
DevNet Resident
Posts: 1925
Joined: Thu Feb 09, 2006 4:52 pm

Post by daedalus__ »

/agree
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

Short tags have always just been to Microsoftish (think asp) for me anyway. I've never used them.
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

Ah..that explains it - I previously had PHP 5.0.2 (or 5.1.2 Im not sure) and I didnt realize I had to make so many Find-and-Replace <? to <?php.

Thanks
Post Reply