← CodeClarityLab Home
Browse by Category
+ added · updated 7d
← Back to glossary

PHP 3 — Birth of the Language (Rasmus Lerdorf)

php PHP 3.0+ Beginner

TL;DR

PHP 3 (1997) was the first version called 'PHP' — a complete rewrite by Zeev Suraski and Andi Gutmans that transformed Rasmus Lerdorf's Personal Home Page tools into a proper language.

Explanation

PHP started as 'Personal Home Page Tools' (PHP/FI) by Rasmus Lerdorf in 1994 — simple C scripts to track website visitors. PHP 3 (1997) was a complete rewrite by Zeev Suraski and Andi Gutmans (Tel Aviv University students), renaming it 'PHP: Hypertext Preprocessor'. Key additions: object support (basic), a more consistent function library, database abstraction, and the name change to PHP. The language was simple, procedural, and embedded directly in HTML. About 10% of all web servers ran PHP 3 at its peak. This rewrite established the open-source PHP we know today.

Common Misconception

Rasmus Lerdorf wrote the version of PHP that became popular — he wrote the original C scripts, but PHP 3 (the foundation of modern PHP) was rewritten by Suraski and Gutmans.

Why It Matters

Understanding PHP's origins explains its design decisions — HTML embedding, loose typing, and function naming inconsistencies all trace back to its scripting tool origins.

Common Mistakes

  • Thinking PHP was designed as a serious language — it evolved organically from CGI scripts.

Code Examples

✗ Vulnerable
<!-- PHP 3 style — HTML with embedded code, no OOP, global functions -->
<?php
$result = mysql_query('SELECT * FROM users');
while ($row = mysql_fetch_array($result)) {
    echo $row['name'] . '<br>';
}
✓ Fixed
// Modern PHP equivalent:
$users = $pdo->query('SELECT * FROM users')->fetchAll();
foreach ($users as $user) {
    echo htmlspecialchars($user['name']) . PHP_EOL;
}

Added 23 Mar 2026
Views 30
Rate this term
No ratings yet
🤖 AI Guestbook educational data only
| |
Last 30 days
0 pings F 0 pings S 3 pings S 1 ping M 0 pings T 1 ping W 0 pings T 0 pings F 0 pings S 3 pings S 0 pings M 0 pings T 0 pings W 0 pings T 0 pings F 0 pings S 4 pings S 0 pings M 0 pings T 0 pings W 1 ping T 0 pings F 0 pings S 1 ping S 0 pings M 0 pings T 1 ping W 0 pings T 0 pings F 0 pings S
No pings yet today
No pings yesterday
Amazonbot 8 Perplexity 7 ChatGPT 3 Unknown AI 3 Google 3 Meta AI 1 Ahrefs 1 Qwen 1
crawler 23 crawler_json 2 pre-tracking 2
DEV INTEL Tools & Severity
🔵 Info ⚙ Fix effort: Low
⚡ Quick Fix
Historical context — no fix needed. Understanding origins helps contextualise PHP's design quirks.
📦 Applies To
PHP 3.0+ web
🔍 Detection Hints
Auto-detectable: ✗ No
🤖 AI Agent
Confidence: Low False Positives: High ✗ Manual fix Fix: Low Context: File

✓ schema.org compliant