FAQ

Why do we need to migrate our system?

The reason to move off PHP lies in where the language came from and how it grew

Published:

01 / INTRODUCTION

This is not about which language is better

People often say that PHP is dangerous. But this is not about which language is better.

Every language has a purpose it was made for and a way it spread: its origin and its upbringing. From these come incident patterns that are specific to that language. Once you know PHP's patterns, the reason to move and the place to move to become clear.

The cause lies in the history of the language. It does not lie with the people who wrote the code.

02 / HISTORY

PHP's origin and upbringing

Key events in PHP's history
WhenWhat happenedSource
1994Rasmus Lerdorf created it to track visits to his online résumé. It was a set of CGI tools written in C (CGI is a way for a web server to call a program), named “Personal Home Page Tools”.S1
June 1995The source code was released to the public.S1
PHP 5.4register_globals (a setting that turns URL values directly into variables) and magic quotes (a setting that automatically adds \ to input) were removed.S2
PHP 7.4allow_url_include (a setting that lets a file at an external URL be loaded as program code) was deprecated.S3
PHP 8.0The rules for loose comparison (==) between strings and numbers changed. A string that is not in numeric form is no longer converted to a number; it is compared as a string.S4

PHP was born as a tool for individuals to add dynamic parts to HTML. It was not built on the assumption of large business systems or confidential data.

PHP grew up on ease of use. It spread by keeping its settings loose so that anyone could get it running right away. The settings in the table above were added for that ease of use, and were removed after they turned out to be dangerous.

Removing them took many years. Code written during those years is still running today.

03 / TODAY

PHP today

How PHP is used today
FactFigureSource
Share of websites using PHP, among websites whose server-side language is known67.8% (as of December 1, 2026)S5
Share of PHP 8, among websites using PHP70.0% (as of December 1, 2026)S6

From the second figure, we can read that about 30% of websites using PHP run on PHP 7 or earlier (100 minus 70.0).

Security fixes for PHP 7 and earlier have already ended. You can check the end date for each version on the compatibility page.

Today's PHP (version 8) has fixed many of the dangerous defaults. What tends to lead to incidents is old versions and code written in old styles. It is not the PHP language itself.

One reason PHP has a large number of vulnerabilities (weaknesses that attackers use) is that many sites use it and a wide range of people write it. The nature of the language alone does not determine the count.

04 / PATTERNS

Patterns that tend to remain in old PHP code

Patterns that tend to remain in old PHP code
PatternWhat happensHow it relates to origin and upbringing
Writing output as isCharacters that a user entered run as a script on the page (XSS: cross-site scripting).PHP was born as a tool for embedding values in HTML. Escaping (replacing symbols with harmless characters) was the writer's job.
Building SQL by joining stringsInput runs as part of the SQL (the command sent to the database). This is SQL injection.An easy way of connecting to a database became widespread.
Loading a file named by a value from outsideAn unintended file, or external code, runs.include (the statement that loads another file) was easy to use, and there was a setting that allowed external URLs too. S3
Relying on loose comparisonDifferent values are judged to be equal.The rule was made to suit the web, where all input is a string. S4
Calling unserialize on data from outsideCode runs from input that was meant to be data (deserialization: turning data in a stored form back into its form inside the program).This pattern is seen across languages, not only in PHP. S9

A version upgrade fixes only the patterns that come from settings and language rules (rows 3 and 4 of the table).

The patterns that come from coding style (rows 1, 2 and 5 of the table) remain after a version upgrade. The code itself has to be fixed.

05 / OTHER LANGUAGES

Other languages have their own patterns too

This is not only about PHP. The table below is ordered by the era each language was born in. It is not a ranking.

Each language's origin and upbringing, and the patterns that come from them
LanguageOrigin and upbringingTypical patterns that come from themSource
C / C++Languages for writing operating systems. Memory checks are left to the writer.Memory handling errors. Chromium (the browser that Chrome is based on) states that about 70% of its high-severity security bugs are memory safety problems.S7
PHPBorn as a tool for personal home pages.As described in “Patterns that tend to remain in old PHP code” on this page.S1 S2 S3 S4
JavaScriptIn 1995, the first prototype was built in about 10 days as a language for the browser.Prototype pollution (the shared parent of objects being rewritten).S8 S10
JavaIt started as a language for consumer electronics. Today it is widely used in enterprise business systems.It has many mechanisms that swap things in at run time, and these become footholds. Log4j (CVE-2021-44228), the Struts expression language (CVE-2017-5638), and deserialization.S9 S11 S12 S13
Ruby on RailsIt put ease of writing, and doing things for you automatically, first.Mass assignment (a feature that saves input fields together, through which unintended fields can be rewritten; the 2012 GitHub incident) and automatic conversion of input (CVE-2013-0156).S14 S15
PythonA general-purpose scripting language.pickle (reading untrusted data runs code).S16
C# / .NETIn a position close to Java's.BinaryFormatter (removed in .NET 9 because it cannot be made secure).S17
VBA (Office macros)A language for automating office documents.Opening a document runs code. Office for Windows now blocks macros in files from the internet by default.S18
RustA language that checks memory safety through ownership (rules that decide who holds each piece of memory).The language prevents memory handling errors at compile time (when the program is converted into a form that can run). It cannot prevent errors in business rules.S19

What is common across languages is the pattern where something passed as data runs as code. The differences between languages are differences in where that hole is open.

06 / UPGRADE OR MIGRATE

Upgrade the version, or move

There are two options: upgrade the version, or move to a technology whose origin fits the nature of the system. This does not mean that you must always move off PHP.

The state of the system and what we recommend
The state of your systemWhat we recommend
Only the version is old, and the code follows current practice (it uses a framework (a set of parts that forms the base for development), passes values to SQL separately, and escapes output)Upgrade to a recent PHP version (8.4 or 8.5), as listed under “Recommended migration targets” on the compatibility page.
Old coding styles remain widely (the patterns above are present). Even a version upgrade requires fixing the places that use removed featuresSince the code has to be rewritten anyway, take the chance to choose the destination again (see the next section).
The nature of the system has changed: for example, it now handles confidential data such as customer information, or its business processing has grownMove to a technology whose origin fits the nature of the system (see the next section).

07 / WHERE TO GO

What to move to: match the nature of the system with the origin of the technology

If you move, as of December 2026 the safe choices are Rust for public websites and Spring Boot (a Java framework) for business systems.

The nature of the system and the direction to move in
Nature of the systemDirection to move inHow it relates to origin and upbringing
Public websites (sites with a small amount of member login, simple e-commerce; the users are the general public; load can rise suddenly)Rust on the server. Build the screens with React or similar, and deploy the built output.The language prevents memory handling errors. What you place on the public side can be kept small, and you are less likely to be chased by end-of-life dates of a runtime (the base software that runs the program).
Business systems (used by employees and business partners; with reports, batch jobs (processing done in bulk), complex transactions (a mechanism that makes a series of operations succeed or fail together), and fine-grained permissions)Spring Boot (Java) on the server.It is widely used in enterprise business systems. Parts such as authentication and transactions are available, and many people can maintain it.

You can tell which applies as follows. Go from the top, and decide by the first one that applies.

How to choose the destination
#QuestionIf it applies
1The system needs any of: reports, batch jobs, complex transactions, or fine-grained permissionsSpring Boot
2The main users are a fixed group of people (employees and business partners)Spring Boot
3It is a public website, and its business processing is about the level of members, cart, orders and inquiriesRust
4None of the above appliesSpring Boot

Whichever you choose, the structure is the same.

  • Divide the system into three tiers: screens, server and database.
  • Put authentication, input validation, business rules and transactions in the server tier. Do not put them in the screen framework.
  • Leave card information with a payment service provider.

There are two points to keep in mind.

  • Moving does not mean that incidents stop happening. Java has its own patterns too. Version management continues at the destination.
  • We present Rust and Spring Boot as the safe choices as of December 2026.

08 / OUR SERVICE

Talk to us about migration

Compatibility and recommended migration targetsAnswer a few questions to see indicative duration and costContact us

REF / SOURCES

Sources

Start with your system.

Discuss your requirements and the support you need.