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

  • Home
  • SEARCH
  • 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 3318550
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:43:08+00:00 2026-05-17T22:43:08+00:00

I need to support some legacy code on a server where I need to

  • 0

I need to support some legacy code on a server where I need to be on the latest stable PHP version at all times. I can’t possibly update the code base every time I upgrade so I’m wondering if there is a way to run this specific site with an older version of PHP than the one installed.

Example: I’m running PHP 5.3.3 and my code for an old site is broken. It was running perfectly on 5.2.x. Can I simply put a command in at the top of the script(s) to run it as 5.2.x so that I don’t have to fix broken code the next time I upgrade to 5.4, 5.5, etc?

TL;DR: Is there a function like this:

exec_as_php_version('5.2.14');//?

  • 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-17T22:43:09+00:00Added an answer on May 17, 2026 at 10:43 pm

    No, there isn’t. Welcome to version dependence hell.

    Edit: Now, 10 years later, this would not be terribly difficult – just run different PHP versions in separate Docker containers. It’s still a bad idea to run really old PHP versions for security reasons, though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Problem: I have to support users who need to edit web pages. Some of
We need to build an administration portal website to support our client/server application. Since
So i need some support with my Ruby assignment, I'm not from US so
i have a input tag which is non editable, but some times i need
I need to support exact phrases (enclosed in quotes) in an otherwise space-separated list
In a current project I need to support finding a User by login credentials
I have been given a requirement where I need to support multiple databases in
For my Swing project, I need to support both Java 5 and Java 6
I need the simplest editor with utf-8 support for editing xml files in windows;
My requirements: Support .NET Compact Framework 2.0 and Windows Mobile 6.0 devices. Only need

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.