roadmap
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
Prepare for PHP interviews on current PHP 8.5: types, arrays, OOP, errors, requests, security, data and speed, plus Composer, PHPUnit, Pest, PHPStan, Xdebug and PHP-FPM.
541 of 541 questions in your plan: 0 known, 0 in progress, 0 due, 0 skipped, 541 new. 0 cut, outside your plan.
PHP gets its own rounds mainly at teams that run it, on Laravel, Symfony or WordPress: there it fills the screen and the first technical conversation, often after a take-home the interviewers have already read. Backend and full-stack loops that list PHP among several languages give it a short language warm-up before the talk moves to the framework or to design. The opening questions find out which PHP you write. What does `0 == "a"` return, and why did PHP 8 change the answer? Why are `$a["1"]` and `$a[1]` the same slot when `$a["01"]` is not? What is left in an array after `foreach ($items as &$item)` is followed by a second loop that reuses `$item`? Does `declare(strict_types=1)` in the file that defines a function protect it from a caller whose file lacks it? Answers separate by how far they reach past the line of code. Knowing `password_hash` is the floor; explaining why `password_needs_rehash` belongs in the login path, or why `unserialize` on a cookie lets an attacker choose whose `__destruct` runs, is the step above. From senior level the questions leave the script for the process around it: why two requests from one user queue behind the session file lock, what turning off `opcache.validate_timestamps` means for a deploy, how `pm.max_children` follows from a worker's memory, and what state a long-running worker carries into the next request.
The runtime opens the plan, ahead of any syntax, because the [share-nothing lifecycle](/topics/lang-php-runtime-lifecycle) explains more later answers than most language features do: why sessions need storage, why a static cache lives for one request, why worker mode breaks code that ran fine for years. Statements and [types](/topics/lang-php-types-syntax) follow at once, since juggling and comparison rules decide questions that look as if they are about arrays or user input. The building-blocks stretch puts those rules to work in [functions and closures](/topics/lang-php-functions) and in [arrays](/topics/lang-php-arrays-strings), the ordered hash map that stands in for both list and dictionary, then text, where string functions count bytes rather than characters. Your own types rest on that: [classes](/topics/lang-php-oop), where constructor promotion, readonly properties and enums changed everyday code, then attributes and [reflection](/topics/lang-php-metaprogramming), through which frameworks read those classes. Next the plan steps out of the single file. [Autoloading](/topics/lang-php-namespaces-autoloading) comes before [Composer](/topics/dev-composer), so the lock file and the generated autoloader land on a clear picture of how a class is found; the PHP-FIG standards then explain how a logger or HTTP client from one vendor plugs into another's code. Failure follows, [exceptions and error handlers](/topics/lang-php-error-handling) first, Xdebug after. The web stretch takes the incoming request apart and pairs it directly with [secure coding](/topics/lang-php-security), because escaping and CSRF tokens make sense only against input you have just seen arrive. Data then runs from files and formats to [PDO and prepared statements](/topics/lang-php-database) and outbound HTTP, before the plan takes PHP off the web request altogether, into CLI scripts, signals and [long-running workers](/topics/lang-php-concurrency), where the first module's lifecycle no longer holds. Tuning sits late because it draws on all of that: [OPcache and the JIT](/topics/lang-php-performance-opcache-jit), refcounting, and [PHP-FPM](/topics/be-php-fpm) pools sized against what a worker really uses. The plan ends where a reviewer of your code begins, with [PHPUnit](/topics/dev-phpunit) and Pest, [static analysis](/topics/dev-phpstan) whose baseline lets an old codebase adopt a strict level gradually, and the style checkers, tools that act on everything above them.
Coming from Java, Python or Go, your instincts fail first in the opening three modules: loose comparison, integer-like string keys and arrays that copy on assignment behave unlike their counterparts there. Switch study order to by topics until those three are behind you, then go back to by frequency for the rest. A developer who learned PHP before 8.0 has the opposite risk: confident answers that were right in 7.x. Spend the hours on types, classes and errors, and drop junior from the level range so definitional questions stop taking turns. Seniors should not let page position set priority: the worker and tuning modules sit near the end but hold much of what a senior round asks. The plan is the language and its tooling without a framework. Routing, a dependency-injection container wiring your controllers, and an ORM such as Eloquent or Doctrine belong to the framework, and most PHP postings name one. For a Laravel team, continue with the [Laravel roadmap](/roadmaps/laravel); a Symfony team is served by the [Symfony roadmap](/roadmaps/symfony).
PHP gets its own rounds mainly at teams that run it, on Laravel, Symfony or WordPress: there it fills the screen and the first technical conversation, often after a take-home the interviewers have already read. Backend and full-stack loops that list PHP among several languages give it a short language warm-up before the talk moves to the framework or to design.
The opening questions find out which PHP you write. What does 0 == "a" return, and why did PHP 8 change the answer? Why are $a["1"] and $a[1] the same slot when $a["01"] is not? What is left in an array after foreach ($items as &$item) is followed by a second loop that reuses $item? Does declare(strict_types=1) in the file that defines a function protect it from a caller whose file lacks it?
Answers separate by how far they reach past the line of code. Knowing password_hash is the floor; explaining why password_needs_rehash belongs in the login path, or why unserialize on a cookie lets an attacker choose whose __destruct runs, is the step above. From senior level the questions leave the script for the process around it: why two requests from one user queue behind the session file lock, what turning off opcache.validate_timestamps means for a deploy, how pm.max_children follows from a worker's memory, and what state a long-running worker carries into the next request.
The runtime opens the plan, ahead of any syntax, because the share-nothing lifecycle explains more later answers than most language features do: why sessions need storage, why a static cache lives for one request, why worker mode breaks code that ran fine for years. Statements and types follow at once, since juggling and comparison rules decide questions that look as if they are about arrays or user input.
The building-blocks stretch puts those rules to work in functions and closures and in arrays, the ordered hash map that stands in for both list and dictionary, then text, where string functions count bytes rather than characters. Your own types rest on that: classes, where constructor promotion, readonly properties and enums changed everyday code, then attributes and reflection, through which frameworks read those classes.
Next the plan steps out of the single file. Autoloading comes before Composer, so the lock file and the generated autoloader land on a clear picture of how a class is found; the PHP-FIG standards then explain how a logger or HTTP client from one vendor plugs into another's code. Failure follows, exceptions and error handlers first, Xdebug after.
The web stretch takes the incoming request apart and pairs it directly with secure coding, because escaping and CSRF tokens make sense only against input you have just seen arrive. Data then runs from files and formats to PDO and prepared statements and outbound HTTP, before the plan takes PHP off the web request altogether, into CLI scripts, signals and long-running workers, where the first module's lifecycle no longer holds.
Tuning sits late because it draws on all of that: OPcache and the JIT, refcounting, and PHP-FPM pools sized against what a worker really uses. The plan ends where a reviewer of your code begins, with PHPUnit and Pest, static analysis whose baseline lets an old codebase adopt a strict level gradually, and the style checkers, tools that act on everything above them.
Coming from Java, Python or Go, your instincts fail first in the opening three modules: loose comparison, integer-like string keys and arrays that copy on assignment behave unlike their counterparts there. Switch study order to by topics until those three are behind you, then go back to by frequency for the rest.
A developer who learned PHP before 8.0 has the opposite risk: confident answers that were right in 7.x. Spend the hours on types, classes and errors, and drop junior from the level range so definitional questions stop taking turns. Seniors should not let page position set priority: the worker and tuning modules sit near the end but hold much of what a senior round asks.
The plan is the language and its tooling without a framework. Routing, a dependency-injection container wiring your controllers, and an ORM such as Eloquent or Doctrine belong to the framework, and most PHP postings name one. For a Laravel team, continue with the Laravel roadmap; a Symfony team is served by the Symfony roadmap.