PHP

A server-side scripting language created by Rasmus Lerdorf in 1995, widely used in web development as an open-source language

PHP

Overview

PHP (Hypertext Preprocessor) is a server-side scripting language that began as a CGI script created by Danish developer Rasmus Lerdorf in 1995 for managing his personal homepage. Thanks to its syntax structure that can be embedded directly into HTML, it is specialized for the dynamic generation of web pages, and it remains a representative open-source language used on a significant portion of web servers worldwide. It is more than just a language in that it is the foundational technology for huge ecosystems such as WordPress, Laravel, and MediaWiki.

Main Content

Origin and Development

  • PHP/FI (1994–1997): The prototype was “Personal Home Page Tools” written by Lerdorf, which provided simple features such as a visitor counter and form handling.
  • PHP 3 (1998): Rewritten by Andi Gutmans and Zeev Suraski, it was expanded under the current name “PHP: Hypertext Preprocessor”; at this point it became an open-source project and grew explosively.
  • PHP 4 (2000): The Zend Engine was introduced, greatly improving performance, and partial object-oriented programming support was added.
  • PHP 5 (2004): Based on Zend Engine 2, a full-fledged object-oriented model, exception handling, PDO (PHP Data Objects), and more were introduced.
  • PHP 6: It aimed for Unicode support but failed, and development was halted in 2010.
  • PHP 7 (2015): Redesigned with Zend Engine 3, it achieved about twice the performance improvement over previous versions, and modern syntax such as scalar type hints and the null coalescing operator was added extensively.
  • PHP 8 (2020): The JIT (Just-In-Time) compiler, Attributes, union types, match expressions, and more were introduced, strengthening both performance and expressiveness.

Language Features

PHP code is written inside <?php ... ?> tags and can be freely mixed with HTML. Variables start with the $ symbol, and type declarations are optional, but the type system has been gradually strengthened as versions have advanced. Type conversion rules stemming from loose typing are friendly to beginners, while also sometimes causing unexpected bugs.

Its main features are as follows.

1. Server-side execution: Code is executed on the server, and only the resulting HTML is sent to the client.

2. Rich built-in functions: It provides a vast standard library for strings, arrays, dates, the file system, regular expressions, and more.

3. Broad DB support: Extensions exist for almost all databases, including MySQL, PostgreSQL, SQLite, and Oracle.

4. Multi-paradigm: It supports both procedural coding and object-oriented coding, and functional-style array processing is also possible.

5. Package ecosystem: Through the Composer dependency management tool, hundreds of thousands of libraries registered in Packagist can be used.

Major Frameworks and CMS

  • Laravel: The most popular full-stack framework, providing powerful tools such as Eloquent ORM, Blade templates, and the Artisan CLI.
  • Symfony: A component-based, enterprise-grade framework on which many large projects are built.
  • CodeIgniter, CakePHP, Yii: A line of lightweight or traditional MVC frameworks.
  • WordPress: It occupies about 40% or more of the global CMS market and is a representative case showing that PHP remains the backbone of the web.
  • MediaWiki: The software that powers Wikipedia, written in PHP.

Criticism and Limitations

PHP has historically been criticized for inconsistent function names (str_replace vs strtolower), security vulnerabilities caused by loose typing, and maintenance problems in old codebases. In particular, because aspects of the hastily assembled early language design remain, there have been many claims that it “lacks consistency.” However, with the performance improvements after PHP 7, the introduction of modern features in PHP 8, and the development of static analysis tools (PHPStan, Psalm), these weaknesses have been largely compensated for.

Latest Trends

As of 2024–2025, the main trends in the PHP ecosystem are as follows.

  • PHP 8.3/8.4: PHP 8.3 was released in late 2023, and PHP 8.4 was officially released in November 2024. In 8.4, Property Hooks, asymmetric visibility, new-less chaining syntax, and the #[\Deprecated] attribute were added, further strengthening object-oriented expressiveness.
  • End of PHP 7 support: As security support for PHP 7.4 ended at the end of 2022, migration to 8.x for companies still operating legacy code has emerged as a major task after 2024.
  • Maturity of performance and JIT: The JIT compiler is increasingly being used in practice, and its performance benefits in CPU-intensive tasks are being demonstrated.
  • Framework modernization: Laravel 11 (2024) introduced a streamlined application structure and improved queue and scheduling features, and Symfony 7 is also actively used. Laravel is evolving into a full-stack development stack in combination with React/Vue-based Inertia.js, Livewire, and more.
  • AI and cloud integration: SDKs for calling APIs from OpenAI, Anthropic, and others in PHP are increasing, and cases of running PHP in serverless environments (AWS Lambda, Bref) are also expanding.
  • Static analysis and type safety: As tools such as PHPStan, Psalm, and Rector become established in standard development workflows, the direction is toward combining the flexibility of dynamic languages with the stability of static checking.
  • Web ecosystem share: According to W3Techs statistics, PHP still maintains an overwhelming No. 1 position among server-side languages (in the 70% range), while competing with Node.js, Python, Go, and others in new projects.

Related Topics

  • [[Laravel]]
  • [[WordPress]]
  • [[Composer]]
  • [[MySQL]]
  • [[웹 개발]]
  • [[서버 사이드 스크립트]]