Website creationPHP 8.5

Rewriting your application in PHP 8.5: how it works and what you gain

How a PHP 7 application is rewritten in PHP 8.5 with no downtime for your teams, and what your business gains. By Smart Impact.

Mehdi B.

Co-founder · SEO & digital strategy

Rewriting your application in PHP 8.5: how it works and what you gain
In brief

A rewrite in PHP 8.5 is done module by module, with the old and new applications running in parallel, without downtime. You gain security fixes until the end of 2029, more reliable code and an application that can evolve again.

You now know that your PHP 7 application will not move to PHP 8 with a simple setting (we explain this in our article on migrating from PHP 7 to PHP 8). The decision to rewrite it has been made, or nearly. That leaves the question most executives ask at this stage: in practice, how does it work, and what does the company gain beyond security? Here we show you how we run this kind of project in PHP 8.5 at Smart Impact.

Rewriting does not mean switching everything off on a Friday evening

When people talk about a rewrite, many imagine a big night: the old application stops, the new one starts on Monday, and you cross your fingers. It is also the riskiest method, and we advise against it.

Think instead of a hotel being renovated floor by floor without closing. Guests keep sleeping on the second floor while the third is redone. For an application, it is the same: the old and the new run side by side. A router sends each user to one or the other depending on the part they use. We switch over one module, check that it works, then move on to the next.

Developers have a vivid name for this method: the “strangler fig”, a plant that grows around an old tree until it replaces it entirely. In the end, the old application has nothing left to do and is switched off, without anyone having experienced an outage.

The stages of the project

Two colleagues planning a project on a whiteboard

  1. We start by taking stock of what the application really does, with the people who use it every day, from accounting to logistics. That is where hidden rules turn up, such as rounding to the nearest 5 centimes or the discount negotiated eight years ago with a large customer. We also almost always find screens that nobody opens any more, and that we will not rewrite.
  2. We then put a safety net under the old application. Tests record its current results: for this order, here is the invoice, here are the shipping costs. The new version will have to produce exactly the same figures.
  3. We build the new foundation, in PHP 8.5, on a maintained framework and up-to-date hosting.
  4. We migrate module by module. The first is deliberately simple, to rehearse the method. The critical parts, such as ordering or invoicing, come next, once everyone has found their bearings.
  5. We transfer the data onto test copies, and compare the totals: same number of customers, same invoice totals, same balances.
  6. When the last module has been switched over, we switch off the old application.

At the end of each module, you approve before we move on to the next. You therefore keep control of the pace and of the budget.

What you gain with PHP 8.5

Security is the reason that triggers the project. But if we stopped there, it would be a lot of money just to get back to square one. A well-run rewrite delivers more than that.

Security fixes until the end of 2029

PHP 8.5 was released on 20 November 2025 and will receive security fixes until the end of 2029. You go from an application with no support at all to several years of fixes, provided you keep up with the updates.

Code that spots its own errors

Modern PHP requires you to specify what each piece of information contains: a price is a number, a name is text. An error that went unnoticed in PHP 7 is blocked straight away. PHP 8.5 goes further and can flag when the result of an important operation is ignored, for example the response of a payment check that nobody reads.

Fewer external parts to watch

PHP 8.5 can now handle web addresses without an outside module. It is a technical detail, but it goes in the right direction: every external component removed is one fewer that risks being abandoned by its author in five years.

An application that can finally evolve

This is often the most underestimated gain. On a modern foundation, connecting your application to a new ERP or opening access to your resellers becomes an ordinary project again. And you find it easier to hire developers willing to work on it.

For your technical team, PHP 8.5 also brings the pipe operator (|>), clone() with property modification, array_first() and array_last(), the attribute #[\NoDiscard] and stack traces on fatal errors.

During the project: what it changes for your teams

Team of developers working at their computers

Your staff keep working on the tool they know. They discover the new parts as they go, one module at a time, which avoids the shock of “everything changes on Monday”.

We will, however, ask you to appoint a point person, someone who knows the business and the tool well. They answer questions about business rules and approve each module. They do not spend their days on it. But when they answer in two days rather than two weeks, the whole project moves faster.

Before each switchover, the users concerned test the new version alongside the old one. For example, the person who handles invoicing compares for a few days the invoices produced by both versions. If a single centime differs, we find out why before switching over.

As for the interface, it is up to you. We can keep screens very close to the existing ones so as not to disrupt anyone, or use the project to simplify what has annoyed everyone for years.

The risks, stated frankly

A rewrite carries risks, so let us say so up front. The ones we meet most often come down to five lines, with what we do to contain them.

The risk How we limit it
Forgetting a business rule buried in the old code Inventory with the users, then automatic comparison of results between the old and new versions
The “while we’re at it” that makes the project swell New ideas go on a separate list, handled once the switchover is complete
An error in the data transfer Several rehearsals on copies, with comparison of totals before the real switchover
A budget that gets out of hand Costing and approval module by module: you can adjust or pause at each stage
Becoming dependent on the provider Standard framework, documented code, and you remain the owner of the code

The second risk is by far the most frequent. It always starts from a good intention, which is why it is hard to refuse.

Not ending up in the same place in ten years

If your application is where it is today, it is rarely because it was badly built. Most often, nobody maintained it for years. The same fate awaits the new one if nothing changes.

The rhythm is nonetheless predictable. PHP releases a new version every year, in November, and each version is maintained for about four years. Frameworks follow a similar calendar: Laravel publishes one major version a year. An up-to-date application therefore needs a small intervention each year, like a car service.

This is what we offer at the end of every rewrite: a maintenance contract that covers upgrading PHP and the framework every year, before the previous version is abandoned. A few days of work a year, instead of a big project every ten years.

Where to start

A rewrite is frightening because we imagine it as a leap into the void. Run module by module, with your teams and regular approval points, it looks more like a well-organised renovation: at each stage you know where you stand and how much is left.

The first step commits you to nothing more than getting a clear view: a diagnosis of your application, which says what to keep and what to redo first.

Frequently asked questions

Will my application be shut down during the rewrite?

No. The old and new versions run in parallel, and we switch over one module at a time. The only interruptions are short switchover windows, planned with you outside working hours.

Why PHP 8.5 rather than PHP 8.4?

PHP 8.5 is the most recent version and the one that will be maintained the longest, until the end of 2029. Starting on an older version shortens your peace of mind by the same amount.

Can we keep our current screens?

Yes. We can reproduce the existing interface so as not to unsettle users, or use the opportunity to simplify it. It is a decision to make at the start of the project.

Who owns the new code?

You do. The code is delivered documented, on a standard framework, so that another provider can take it over if needed.

Sources

PHPPHP 8.5
Mehdi B.
About the authorMehdi B.

Co-founder of Smart Impact. Hooked on the web from the start, he launched his first project in 2006: an online music magazine still running today. With close to 20 years of SEO experience, a Swiss federal diploma in marketing and a solid geek streak, he turns clients' ideas, sometimes hazy ones, into concrete digital projects with his team.

LinkedIn
Further reading