Internative Logo

What Is PHP? The Server-Side Language Behind Much of the Web

What Is PHP? The Server-Side Language Behind Much of the Web

A large share of the web still runs on code that executes on the server, builds an HTML page and sends it to the browser. For three decades the most common language for that job has been PHP. It powers WordPress, Drupal and MediaWiki, the software behind Wikipedia, and modern frameworks such as Laravel and Symfony have turned it into a solid choice for business applications and APIs. It is also a language with a reputation shaped by its early years, much of which no longer describes the PHP of today.

This article explains what PHP is, how it runs, where it fits, when another language is the better call, and how it compares with the alternatives.

What is PHP?

PHP is an open-source, general-purpose scripting language designed for web development. The name is a recursive acronym for "PHP: Hypertext Preprocessor". PHP code runs on the web server: it reads the request, talks to databases and other services, and produces the response, usually HTML or JSON. The browser never sees the PHP source, only its output.

Rasmus Lerdorf started it as a set of tools to manage his personal home page. He announced Personal Home Page Tools version 1.0 on Usenet on 8 June 1995. Andi Gutmans and Zeev Suraski rewrote the core for PHP 3, released in 1998, and their Zend Engine became the heart of PHP 4 in 2000. PHP 7 in 2015 ran typical applications up to twice as fast as its predecessor, and PHP 8 in 2020 added a JIT compiler, union types, attributes and named arguments.

A new minor version ships every year, usually in November. Each branch gets two years of active support followed by two years of security fixes only, and the official supported-versions page lists the dates. Since 2021 the PHP Foundation has funded developers to work on the language core.

How PHP works

Request in, response out. In the classic model a web server such as Apache or Nginx passes each request to PHP, usually through PHP-FPM, a pool of worker processes. PHP runs the script, returns the output and discards the request's state. Nothing leaks from one request to the next unless you store it in a database, a cache or a session.

Shared-nothing by design. Because every request starts clean, a crashed request rarely takes others down, and scaling out is mostly a matter of adding more workers or servers behind a load balancer.

Compiled to opcodes and cached. PHP compiles scripts to bytecode (opcodes). The OPcache extension keeps that bytecode in memory so the parsing cost is paid once, and the JIT can compile hot paths to machine code, which helps most with CPU-heavy code.

Long-running servers when needed. Application servers such as FrankenPHP, RoadRunner and Swoole keep the application in memory between requests. That cuts start-up cost per request, at the price of having to manage state and memory more carefully.

Key features

  • Built for the web: request and response handling, sessions, cookies, file uploads and HTML output are part of the language and runtime.
  • A modern type system: scalar and return types, union and intersection types, enums, readonly properties and typed class constants.
  • Composer and Packagist, the package manager and public registry that give PHP projects reproducible dependencies.
  • Mature frameworks: Laravel and Symfony for applications and APIs, with queues, ORMs, authentication and testing built in.
  • Database access through PDO and extensions for MySQL, PostgreSQL, SQL Server, SQLite and more.
  • Cheap, widespread hosting: almost every web host supports PHP, from shared hosting to containers and managed platforms.

Where PHP is used

  • Content management systems such as WordPress and Drupal, and the plugins and themes around them.
  • Content-heavy websites: publishers, corporate sites, associations and member portals.
  • E-commerce on platforms such as WooCommerce and Magento (Adobe Commerce).
  • Business applications and APIs built with Laravel or Symfony.
  • Integration backends that sit between an ERP, a payment provider and a website, moving and transforming data.
  • Legacy systems that have run for years and are being modernised step by step rather than rewritten.

When to choose PHP, and when not to

Choose PHP when:

  • The product is a content-heavy site or a CMS-based platform, where PHP's ecosystem is the deepest.
  • You want fast development with a mature framework and conventions the team already knows.
  • Hosting options and the availability of developers matter more than following a trend.
  • You are extending or modernising an existing PHP system, where keeping the language is often cheaper and safer than a rewrite.

Look elsewhere when:

  • The system needs many long-lived connections, such as WebSockets or real-time collaboration. Node.js or a dedicated real-time service fits that model more naturally.
  • The core of the product is machine learning or data processing. Python has the libraries.
  • You need a strongly structured platform for a large enterprise domain with heavy concurrency. .NET or Java offer more out of the box.
  • The team would have to learn PHP from scratch only for this project and already works productively in another stack.

PHP and its alternatives

OptionLanguageTypical frameworkBest fit
PHPPHPLaravel, SymfonyContent sites, CMS platforms, business web apps
Node.jsJavaScript / TypeScriptExpress, NestJSAPIs, real-time services, full-stack TypeScript
PythonPythonDjango, FastAPIData- and AI-heavy backends
.NETC#ASP.NET CoreEnterprise systems, Microsoft-centred teams
RubyRubyRuby on RailsFast product development with strong conventions

Node.js is the most common comparison. Both build web backends; PHP's per-request model is simpler to reason about and to host, while Node.js keeps one process alive and handles many concurrent connections in it. Python is the stronger choice when the backend's main job is data or AI. For a team that already ships good Laravel or Symfony code, switching languages rarely pays off by itself.

How we use PHP at Internative

We use PHP in projects that need rapid development, a mature ecosystem and proven stability. It remains a reliable choice for content-heavy platforms and for integration-focused backend systems.

A PHP system stays healthy only while it runs on a supported version; we explain what that takes in Software Maintenance and Support After Launch.

If you are planning a content platform or a backend that has to connect several systems, our custom website development and system integration teams can help you decide whether PHP is the right base.

Frequently asked questions

What is PHP actually used for?

Mainly for server-side web development: rendering web pages, running content management systems such as WordPress and Drupal, building e-commerce sites and serving APIs. It can also run command-line scripts and scheduled jobs, but the web is where it is strongest.

Is a PHP website secure?

It can be, and the language is not the main factor. Most incidents come from outdated versions, vulnerable plugins and application code that trusts user input. Running a supported PHP branch matters: in October 2026 the PHP project shipped emergency releases for every supported branch to fix two critical remote code execution flaws, CVE-2026-109618 and CVE-2026-109619, while older versions had to rely on vendor backports.

Is PHP still used?

Yes. It runs a large part of the web, including WordPress and Wikipedia, and it is actively developed, with a new version every year and frameworks such as Laravel and Symfony releasing regularly.

What is the best PHP framework?

There is no single answer. Laravel is the most popular choice for new applications because of its developer experience and ecosystem. Symfony is preferred for long-lived, component-based systems, and many other projects, Drupal among them, are built on its components. The team's experience usually decides it.

What is the difference between HTML and PHP?

HTML describes the structure of a page and is read by the browser. PHP is a programming language that runs on the server and usually generates that HTML. A PHP page can contain HTML, but the browser only ever receives the finished HTML that PHP produced.

Related services

Where this topic becomes an engagement.

Keep reading

The articles that follow this one.