PHP History & Versions क्या है?
Complete Guide in Hindi
PHP का पूरा इतिहास हिंदी में — 1994 से लेकर PHP 8.4 तक। Rasmus Lerdorf की personal script से दुनिया की सबसे popular web language तक की पूरी journey।
Classic Interview Trick Question
PHP 6 kabhi officially release nahi hua! PHP 5 ke baad directly PHP 7 aaya। Agar koi interview mein pooche "PHP 6 mein kya aaya?" — jawaab hai: "PHP 6 release hi nahi hua।" Yeh almost har PHP interview mein puchha jaata hai।
📋 इस Article में क्या-क्या है (Table of Contents)
- PHP History क्या है?
- PHP की शुरुआत — Rasmus Lerdorf
- PHP 1.0 से 4.0 — Early Era
- PHP 5.0 — OOP का दौर
- PHP 6 — जो कभी आया ही नहीं
- PHP 7 — Speed Revolution
- PHP 8 — Modern PHP
- Quick Reference Table
- Version क्यों matter करता है?
- FAQ और Conclusion
PHP History से मतलब है — PHP language कैसे बनी, किसने बनाई, और समय के साथ कैसे develop हुई। PHP Versions से मतलब है — PHP के अलग-अलग releases जैसे PHP 5, PHP 7, PHP 8, और इनमें क्या-क्या नया आया।
Rasmus Lerdorf ने Perl scripts का collection public release किया। PHP 2.0 (PHP/FI — Forms Interpreter) में form data process करने की ability आई। यह कोई proper language नहीं थी — बस tools का set था।
Zeev Suraski और Andi Gutmans ने पूरी language को scratch से rewrite किया। यहाँ से PHP एक proper programming language बनी। Name officially बदला — "PHP: Hypertext Preprocessor"। MySQL support आया और हज़ारों developers ने adopt करना शुरू किया।
Zend Engine 1.0 के साथ launch हुई — performance बहुत बढ़ी। Sessions आए जिससे login systems बनाना possible हुआ। Output buffering आया। Millions of websites PHP पर shift हुईं — यह PHP का पहला mass-adoption era था।
PHP का सबसे important milestone। Object-Oriented Programming properly implement हुई — Classes, Objects, Interfaces, Abstract Classes, Constructors, Destructors सब आए। PDO (PHP Data Objects) से database handling secure और consistent हुई। Exception Handling आई। यह modern PHP की असली नींव है।
class Car {
public $brand;
public function __construct($brand) {
$this->brand = $brand;
}
public function getInfo() {
return "Car: " . $this->brand;
}
}
$myCar = new Car("Toyota");
echo $myCar->getInfo(); // Car: Toyota
?>
❌ PHP 6 — कभी Release नहीं हुआ
PHP 6 का development 2005 में शुरू हुआ था — main goal था Unicode support add करना। लेकिन technical challenges इतने ज़्यादा थे कि project 2010 में abandon कर दिया गया। जो useful features थे वो PHP 5.3 और 5.4 में merge हो गए। इसीलिए PHP 5 के बाद directly PHP 7 आया — PHP 6 officially exist नहीं करता।
PHP की सबसे बड़ी performance leap। PHP 5.6 के मुकाबले 2x speed — यह बहुत बड़ा था। Zend Engine 3.0 आया। Type Declarations से code reliable हुआ। Null Coalescing Operator ?? एक game changer था।
// PHP 5 mein aise likhna padta tha:
$name = isset($_GET['name']) ? $_GET['name'] : 'Guest';
// PHP 7 mein ab itna simple hai:
$name = $_GET['name'] ?? 'Guest';
// Type Declaration example:
function addNumbers(int $a, int $b): int {
return $a + $b;
}
?>
PHP का modern era शुरू हुआ। JIT (Just-In-Time) Compiler से performance और बढ़ी। Match Expression ने switch statements को replace किया। Named Arguments ने function calls readable बनाए। Union Types, Nullsafe Operator — यह PHP का सबसे बड़ा leap था PHP 7 के बाद।
// PHP 7 mein switch use karte the:
switch ($status) {
case 1: $msg = "Active"; break;
case 2: $msg = "Inactive"; break;
}
// PHP 8 mein match use karo — cleaner!
$msg = match($status) {
1 => "Active",
2 => "Inactive",
default => "Unknown"
};
?>
Enums — PHP में finally proper enum type आया। Readonly Properties — value once set होने के बाद change नहीं हो सकती। Fibers — async programming के लिए। Intersection Types, never return type — बहुत powerful additions।
enum Status {
case Active;
case Inactive;
case Pending;
}
$userStatus = Status::Active;
echo $userStatus->name; // Active
?>
Readonly Classes — पूरी class readonly बना सकते हो, हर property individually readonly mark करने की ज़रूरत नहीं। Disjunctive Normal Form Types, Deprecated dynamic properties — PHP mature होती जा रही है।
PHP 8.3 में Typed Class Constants, json_validate() function, और Readonly के improvements आए। PHP 8.4 (latest as of 2024-2026) में Property Hooks — getter/setter को define करने का elegant तरीका। Asymmetric Visibility, बिना new keyword के method chaining।
| Version | Year | सबसे बड़ा Feature | Status |
|---|---|---|---|
| PHP 1.0 | 1995 | Personal scripts, basic form handling | Obsolete |
| PHP 3.0 | 1997 | Proper language, MySQL support | Obsolete |
| PHP 4.0 | 2000 | Zend Engine, Sessions | Obsolete |
| PHP 5.0 | 2004 | OOP, PDO, Exception Handling | EOL 2018 |
| PHP 6 | — | Never Released (abandoned) | ❌ Doesn't Exist |
| PHP 7.0 | 2015 | 2x Speed, ??, Type Declarations | EOL |
| PHP 7.4 | 2019 | Typed Properties, Arrow Functions | EOL 2022 |
| PHP 8.0 | 2020 | JIT, Match, Named Arguments | EOL 2023 |
| PHP 8.1 | 2021 | Enums, Readonly, Fibers | Security only |
| PHP 8.2 | 2022 | Readonly Classes, DNF Types | Active |
| PHP 8.3 | 2023 | Typed Constants, json_validate() | Active ✅ |
| PHP 8.4 | 2024 | Property Hooks, Asymmetric Visibility | Latest ⭐ |
✅ Use करें (2025-2026)
- PHP 8.4 (Latest — recommended)
- PHP 8.3 (Active support)
- PHP 8.2 (Active support)
- Laravel 10/11 (requires PHP 8.1+)
❌ बिल्कुल Use न करें
- PHP 5.x (EOL 2018 — Security Risk)
- PHP 7.0–7.3 (EOL — No updates)
- PHP 7.4 (EOL December 2022)
- PHP 8.0 (EOL November 2023)
Performance
- JIT Compiler active
- PHP 5 से ~3x faster
- Memory use कम
- Optimized opcache
Security
- Regular security patches
- Active bug fixes
- Modern encryption support
- Deprecated unsafe functions
New Features
- Property Hooks
- Asymmetric Visibility
- Array functions improvements
- Cleaner syntax
PHP की history एक personal script से शुरू होकर दुनिया की सबसे ज़्यादा use होने वाली web language तक पहुँचने की inspiring journey है। PHP 1.0 से PHP 8.4 तक — हर version ने language को और powerful, fast, और developer-friendly बनाया।
PHP 1994 में एक personal project था, आज 80%+ websites पर use होता है।
PHP 5 ने OOP लाई — modern PHP programming की नींव यहाँ से पड़ी।
PHP 6 कभी release नहीं हुआ — PHP 5 के बाद directly PHP 7 आया।
PHP 7 ने 2x speed दी — PHP की "slow" वाली reputation यहाँ खत्म हुई।
PHP 8.x modern, fast, और feature-rich है — यही use करें आज।
हमेशा latest stable version (PHP 8.3/8.4) use करें — security और performance के लिए।