PHP and Laravel interview reference
A gap-driven reference for an experienced developer who wants to attach precise names and mental models to existing practice, correct inaccurate intuitions, and prepare for regular and senior PHP/Laravel interviews.
This is not a linear course or beginner tutorial. Start from a question, misconception, or weak area and follow the relevant topic. Pages prioritize mechanisms, distinctions, trade-offs, failure modes, and interview prompts over exhaustive API coverage.
Start here
Section titled “Start here”- Read how to use this repository.
- Use the knowledge-gap audit to select topics.
- Choose a focused route from study routes.
- Rehearse with the interview question bank.
- Check the version guide before relying on version-sensitive details.
- For repository expansion work, follow the content authoring standard and expansion roadmap.
Pages marked Outline define scope for later expansion. Existing concise pages are retained as usable summaries and will be split or deepened section by section.
- Type system and language semantics — complete
- Object model — complete
- Functions, closures, and callables — complete
- Arrays, values, and comparison — complete
- Errors, exceptions, and shutdown behavior — complete
- Runtime, memory, OPcache, and process models — complete
- Composer, autoloading, and standards — complete
- Modern and legacy PHP — complete
Laravel
Section titled “Laravel”- Framework foundations — complete
- Request lifecycle, container, providers, and facades — complete
- Routing, middleware, and model binding — complete
- Validation, authorization, policies, and tenant boundaries — complete
- Eloquent model mechanics — complete
- Eloquent relationships and loading — complete
- Authentication and API security — complete
- Cache, sessions, and Redis integration — complete
- Filesystem, uploads, and object storage — complete
- Queues, events, listeners, notifications, and retries — complete
- Configuration, exception handling, and logging — complete
- Testing Laravel applications — complete
- Artisan commands and task scheduling — complete
- Deployment and long-running workers — complete
Engineering
Section titled “Engineering”- Data structures, complexity, and the real bottleneck — complete
- Concurrency, processes, and asynchronous I/O — complete
- HTTP, networking, and web boundaries — complete
- HTTP and API design — complete
- Databases, indexes, and concurrency — complete
- Cache and Redis reasoning — complete
- Distributed delivery and reliability — complete
- Testing and software quality — complete
- Application and operational security — complete
- Performance, capacity, and scalability — complete
- Software design, architecture, and DDD — concise draft
- Deployment, observability, and operations — concise draft
- Observability and incident response — outline
- Team practices and system design — concise draft
- Technical leadership — outline
- System design — outline
Interview practice
Section titled “Interview practice”- Answer frameworks
- Cross-topic question bank
- PHP questions
- Laravel questions
- Backend-engineering questions
- Database and distributed-systems questions
- Architecture and leadership questions
- Debugging scenarios — outline
- Code-review scenarios — outline
- System-design and implementation scenarios
- Checkout code review and discussion notes
Reference and optional material
Section titled “Reference and optional material”- Terminology glossary
- Commonly confused concepts — outline
- Primary-source map — outline
- Runnable and focused examples
- Frontend knowledge for Laravel developers — optional outline
- AI-assisted development — optional
Content standard
Section titled “Content standard”When expanding a page, prefer this sequence:
- Precise definition
- Mechanism
- Common confusion
- Production consequence or failure mode
- Alternatives and trade-offs
- Version or legacy context where relevant
- Precision, diagnosis, and decision interview prompts
Basics may be linked rather than retaught. A page should explain enough to correct a mental model, not duplicate official documentation.
Source policy
Section titled “Source policy”Claims that can age should link to primary documentation. Timeless concepts can be summarized without citation clutter. See the version and compatibility guide and primary-source map.
Static site
Section titled “Static site”The repository includes an Astro Starlight site generated from these Markdown files. The root content directories remain the canonical source; npm run sync:content creates ignored, Starlight-ready copies under src/content/docs.
npm installnpm run devRun npm run check to validate the Astro project and npm run build to generate the static site in dist/ and verify its local links. Any static host can serve that directory. Set SITE_URL to the deployed origin to generate a sitemap and canonical metadata.
Search indexing is disabled by default for semi-public deployments. Set INDEX_SITE=true during the production build to allow indexing, for example SITE_URL=https://reference.example.com INDEX_SITE=true npm run build.