The Pedagogical Philosophy: One Path at a Time
Most introductory programming books face a tension: show learners the idiomatic way, or acknowledge that multiple valid approaches exist? Thomas Theis chooses the former. In the preface to the 14th edition of Einstieg in PHP 8 und MySQL, he states the compromise plainly: the book presents a single solution per use case to avoid overwhelming beginners, while acknowledging that other correct approaches exist. This decision shapes the entire 18-chapter arc.
The curriculum follows a classic syntax-structure-synthesis progression. Early chapters isolate language constructs – variables, control structures, functions, arrays – before introducing form processing, then database integration, then object-oriented programming. Each concept reappears in later, larger projects: a session-based shop, an Ajax endpoint, a CAPTCHA generator, a PDF invoice, and finally a multiplayer card game that stores state in XML files. This spiral reinforcement means a learner encounters foreach, prepared statements, and superglobals repeatedly, each time in a richer context.
The author also frames PHP’s server-side execution model as a simplifying factor. Because code runs on the server and only HTML reaches the browser, beginners avoid the mental overhead of client-server synchronization that frameworks like React or Vue demand. Whether that claim holds up against modern full-stack tooling is debatable, but for a 2021 textbook targeting absolute novices, it reduces initial cognitive load.
Type System Evolution in the Classroom
One of the book’s strengths is its explicit version-gated tour of PHP’s type system. Readers see scalar types (int, float, string, bool), nullable types (?type), declare(strict_types=1), constructor property promotion (PHP 8.0), typed properties, match expressions, null coalescing operators (??, ??=), named parameters, and the spaceship operator (<=>). Each feature arrives with a version marker – PHP 5.6 through 8.0 – so learners understand that the language has evolved.
A crucial nuance gets highlighted: strict_types is file-scoped. Parameter checks apply to the calling file; return-type checks apply to the defining file. This distinction often trips up developers who assume strictness is global. The book also notes that match arms in PHP 8.0 are limited to single expressions (block arms arrived in 8.1), and that intdiv() truncates operands before dividing, then truncates the result – behavior that differs from integer division in some other languages.
Security as Layered Retrofit
Security is not a standalone module. Instead, it reappears as a retrofit across chapters. Chapter 5 introduces error-display configuration, attack vectors, input validation, SQL injection prevention via prepared statements, and password handling with password_hash and password_verify. Early examples deliberately omit validation for simplicity; hardening routines arrive later.
This approach has a visible cost. The prepared-statement example binds loose types without prior validation, and later bulk UPDATE/DELETE examples revert to direct string interpolation. The author claims prepared statements provide a large advantage against SQL injection when used correctly, but the book’s own code sometimes contradicts that discipline. Missing entirely are CSRF tokens, SameSite cookie attributes, password_needs_rehash for algorithm migration, MIME sniffing for uploads, and Content Security Policy. The @ error-suppression operator is presented as a tool rather than an anti-pattern.
Database Abstraction Triad
Unusually for an introductory text, the book teaches three database APIs in parallel: mysqli (both procedural and object-oriented), PDO, and SQLite3. The PDO chapter emphasizes driver-agnostic code – only the DSN changes – while SQLite3 is presented as a file-based, zero-configuration alternative with dynamic type affinity and whole-file write locking. The author notes commercial-use freedom for SQLite3 versus MySQL licensing considerations.
This comparative view is rare and valuable. Most beginner books pick one API and stick with it. Seeing the same CRUD operations expressed in three different interfaces helps learners recognize the underlying patterns: prepare, bind, execute, fetch. The trade-off is cognitive overhead; a novice must juggle three sets of method names and error-handling conventions simultaneously.
Capstone Projects: Synthesis in Action
The final chapters anchor four projects that synthesize cross-chapter skills. A chat application, a blog with image load-time optimization, a multiplayer card game using XML state and three-second meta-refresh polling, and an LSB steganography tool that embeds a PDF into a PNG via bit-plane packing. Each project reveals the book’s pedagogical compromises in sharp relief.
The multiplayer game acknowledges that short polling scales poorly and that XML writes without file locking risk race conditions. The steganography example notes that perceptual invisibility claims lack empirical citation and that paired-value analysis can detect LSB embedding. These self-critiques are refreshing – they model the habit of questioning one’s own implementation.
The CRUD personen application, a single file with JavaScript dispatch (send(action,id)), positional ? placeholders, and bind_param(“ssids”, …), serves as a compact template for simple internal tools. The pizza order form demonstrates match for price lookup, isset for checkbox toppings, and number_format for German locale currency. The progressive tax calculator uses four brackets, floatval sanitization, and the same locale formatting – labeled stark vereinfacht (greatly simplified) by the author.
Where the Book Shows Its Age
Published in 2021 targeting PHP 8.0, the text misses every major language feature since: enums, fibers, readonly properties, first-class callables, array_is_list, never return type. MySQL 8.0 specifics – CTEs, window functions, JSON enhancements, roles – are absent. The bundled GD version (2.1.0 compatible) lacks WebP and AVIF support; ImageMagick is not mentioned.
The ecosystem blind spots are equally telling. No Composer, PSR standards, PSR-4 autoloading, static analysis (PHPStan, Psalm), testing (PHPUnit), CI/CD, Docker, or modern frameworks (Laravel, Symfony). Frontend coverage stops at vanilla XMLHttpRequest – no fetch, no ES modules, no build step. CSS appears only for UI enhancement. For a learner aiming at professional work in 2024, these omissions represent a significant gap between the book’s world and current practice.
Performance and scale receive no attention: no OPcache, APCu, Redis, connection pooling, query optimization beyond basic indexing, horizontal scaling, or async runtimes like ReactPHP or Swoole. File-based examples load entire files into memory; race conditions on counters and XML state are acknowledged but unresolved (flock is absent).
Practical Value for Today’s Learners
Despite its version lock, the book retains value in three areas. First, its comparative API coverage (mysqli/PDO/SQLite3) remains a rare pedagogical asset. Second, its explicit documentation of the PHP 7-to-8 transition – scalar types, match, constructor promotion, ::class on objects – gives a clear map of what changed and when. Third, the capstone projects function as readable, if not production-ready, integration examples that can be adapted for prototypes or portfolio pieces.
Instructors can follow the chapter sequence for a semester course; self-learners can adopt the author’s advocated methodology: design on paper, write a minimal version, test, expand. The appendix’s OS-specific XAMPP installation guides (Windows C:\xampp, Ubuntu /opt/lampp, macOS /Applications/XAMPP) and phpMyAdmin export/import workflows remain practically useful for local development setup.
The book’s German-only identifiers ($bezeichnung, $geschwindigkeit), hard-coded German date and number formats (d.m.Y, decimal comma), and NRW-specific holiday logic limit its direct international applicability. No i18n/l10n discussion appears – no gettext, ICU, NumberFormatter, or IntlDateFormatter. For a German-speaking novice in 2021, that was a feature; for a global audience today, it’s a constraint.
Ultimately, Einstieg in PHP 8 und MySQL succeeds as a pedagogical artifact – a carefully scaffolded, German-language on-ramp to server-side web development circa 2021. Its single-solution spiral curriculum reduces decision paralysis for beginners, and its comparative database chapter offers a perspective most modern tutorials skip. But any learner who finishes it must immediately supplement with Composer, PSR-4, a modern framework, static analysis, and a security checklist that goes far beyond prepared statements and bcrypt. The book opens the door; the industry has moved the house.