PHP Misconceptions
Put thirteen common claims about PHP and Laravel to the test with runnable examples, a local performance lab, and the trade-offs that still matter.

Chapters 13
- Can PHP Be Typed?
- Is PHP Always Slow?
- How Fast Can Laravel Be?
- Does PHP Have to Be Messy?
- Is PHP Old and Dead?
- Do Dollar Signs Make PHP Expensive?
- Is PHP Only for WordPress?
- Is PHP Inherently Insecure?
- Can PHP Scale?
- Can PHP Do Concurrency?
- Does PHP Have Serious Developer Tools?
- Which PHP Quirks Still Matter?
- Does Legacy PHP Always Need a Rewrite?
If you last used PHP to put a contact form on a website, you might be surprised by what you can write today. PHP can enforce a typed function signature, and Laravel can keep a booted application in memory between requests. The dollar signs are still there. The runtime is still free.
Start with a function that accepts or rejects a numeric string depending on the calling file. Then measure the same Laravel app in two serving modes and watch one change to the database query remove forty queries from a request. Along the way, you’ll see why some old criticisms still matter and how to recognise them in the code you maintain.
What you’ll need
Section titled “What you’ll need”Read the chapters in order or jump to a claim you’ve heard. Run the series examples with PHP 8.6 or later from a local checkout of Code with PHP. The Laravel chapters use a separate Laravel 13 app, with Composer and SQLite. Only the performance lab needs FrankenPHP and ApacheBench.
Types, speed and code quality
Section titled “Types, speed and code quality”- PHP can’t be typed — Compare runtime checks, caller-side strictness and static analysis.
- PHP is always slow — Work out where OPcache, JIT and PHP-FPM fit into a request.
- Laravel is too slow for production — Measure Octane with FrankenPHP and change the shape of a database query.
- PHP code is always messy — Follow a Laravel quote through validation, pricing and tests.
Age, cost and use cases
Section titled “Age, cost and use cases”- PHP is old and dead — Check the support calendar and run an enum with a property hook.
- PHP is expensive because it’s full of dollar signs — Read PHP’s variable syntax and calculate the cost of running an app.
- PHP is only for WordPress — Run one inventory report as a command and as a JSON endpoint.
Production and maintenance
Section titled “Production and maintenance”- PHP is inherently insecure — Trace a request through validation, authorisation, the database and the response.
- PHP can’t scale — Follow a Laravel application as it grows from one server to three.
- PHP can’t do concurrency — Run a Fiber and choose between concurrent requests, parallel I/O and a queue.
- PHP has no serious developer tools — Check a Laravel feature with Composer, Pint, Larastan and PHPUnit.
- PHP’s old quirks explain everything about it — Try the comparisons, return values and arrays that still surprise developers.
- Legacy PHP always needs a rewrite — Capture existing behaviour and plan a PHP upgrade in stages.