PHP 3 — Birth of the Language (Rasmus Lerdorf)
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;
}
Tags
🤝 Adopt this term
£79/year · your link shown here
Added
23 Mar 2026
Views
30
🤖 AI Guestbook educational data only
|
|
Last 30 days
Agents 0
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
Also referenced
How they use it
crawler 23
crawler_json 2
pre-tracking 2
Related categories
⚡
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