Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 393651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T16:16:44+00:00 2026-05-12T16:16:44+00:00

I recently upgraded to xampp v1.7.2 which dumped PHP 5.3 on me. Along with

  • 0

I recently upgraded to xampp v1.7.2 which dumped PHP 5.3 on me. Along with that all my httpd.confs and php.ini’s got wiped out (I had taken it for granted that this release will be an upgrade like all the earlier xampp releases). Anyway, it took me a while to reconfigure all the services – but now I’ve run into a funny problem.

This self-written CMS that is used in my workplace uses a lot of the alternative conditional syntax for if-else, i.e.

if( condition ): ?>
    <some html />
<?php else: ?>
    <some other html />
<?php endif;

This used to work fine with PHP 5.2.x that came along with xampp 1.7.1 – and now suddenly such code blocks are producing this error:

Parse error: syntax error, unexpected
T_ELSE in …

I haven’t altered my script in any way – the same used to work absolutely without a hitch in PHP 5.2.x.

So my question is, does PHP 5.3 allow such alternative conditionals? Or do I have to turn on some hidden option in my config files?

Please note that I don’t use shorttags – so they aren’t an issue here.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T16:16:44+00:00Added an answer on May 12, 2026 at 4:16 pm

    Although the if/else syntax hasn’t changed in 5.3, many other parts of the syntax have. You should check the lines just before the else statement in question to see if one of the other new syntax features is confusing the parser.

    If you can’t figure out where the problem is, you can always just start systematically deleting lines of code until you’re left with the following three lines:

    <?php if(condition): ?>
    <?php else: ?>
    <?php endif ?>
    

    Update: You really should test your code with short_open_tag turned on, because the syntax error you see is what you would get if you had this code somewhere:

    <? if(condition): ?>
    <?php else: ?>
    <?php endif ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently upgraded to Visual Studio 2010 and found out that when I press
I recently upgraded my XAMPP from PHP 5.2 to 5.3.1 I seem to be
I recently upgraded to CodeIgniter 2.1. The below model code (machforms_model.php) was properly working
I recently upgraded to Ubuntu 10.04 which comes with Emacs 23. I need Jabref
I am using XAMPP for development. Recently I upgraded my installation of xampp from
Recently upgraded to Fancybox v2 and can't figure out how to keep Fancybox open
I recently upgraded my solution from .net framework 3.5 to 4.0. All good except
I recently upgraded one of my applications to Rails 2.2.2. Having done that, I've
Recently upgraded to XCode 4.5 I have a screen that's had 2 UIStepper controls
I recently upgraded my Mac's OS from Lion to Lion Server, which changes how

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.