What should I review for a PHP and Laravel interview?
Which questions came up most often?
The questions about Laravel middleware, Blade, and WordPress were asked most often. Each appeared in 3 of 39 interviews. Start with these checks:
- Can you explain what middleware is in Laravel?
- Can you describe Blade and how you use it to render pages?
- Can you explain what WordPress is and how developers use it?
Other repeated questions asked about PHP comparisons, data types, error handling, service providers, Eloquent relationships, application structure, and concurrency. Check whether you can answer the full question. For example, the comparison question asks both how the operators differ and what can go wrong if you choose the wrong one.
Which PHP and Laravel basics should I check?
PHP basics and Laravel basics each appeared in 9 of 39 interviews. The questions cover both the language and how the framework handles a request.
- Can you explain the difference between
==and===, including problems caused by choosing the wrong operator? - Can you group PHP's data types and explain how those groups differ?
- Can you describe PHP error handling and the constructs available for it?
- Can you walk through Laravel's request lifecycle and explain service providers, middleware, and route groups?
For Eloquent, can you explain when to use hasOne, hasMany, belongsTo, and belongsToMany? Check that you can describe how each relationship works, not just list its name.
What practical problems should I be ready to discuss?
Performance and maintenance appeared in 10 of 39 interviews. Questions covered slow queries, memory, caching, monitoring, and work on older applications. Use these checks for that topic and related database, queue, and design questions:
- How would you benchmark performance and investigate slow queries?
- How would you handle concurrent database updates?
- How would you track queue job progress and handle rate limits?
- How would you structure a large Laravel application with many modules?
For APIs and security, can you explain input validation, authentication, and authorization? Can you discuss SQL injection, payment integrations, and idempotency?
Should I review PHP platforms beyond Laravel?
WordPress, Magento, and other PHP frameworks appeared in 14 of 39 interviews, the most of any topic. Start with the platforms you work with. Can you explain WordPress file protection or Magento internals and search? The questions also cover Shopware comparisons, CodeIgniter features, Bitrix, and Solarium.
Who gets asked PHP and Laravel
The 20 most asked PHP and Laravel questions
Counted by interview, not by mention: a question asked twice in one conversation counts once.
What is middleware in Laravel?
Asked in 3 of 39 interviews · last asked May 22 · Concept · Junior
Show answer
Middleware is a layer that runs around request handling in Laravel. It can check a request before passing it on, or change the response on its way back. It is used for tasks such as authentication, rate limiting, and CSRF protection.
- Middleware can apply to all requests or only selected routes and route groups.
- It can pass a request onward or stop it with a response, such as a redirect.
- Middleware order matters because each layer wraps the next.
What the interviewer checks: The interviewer wants to know how middleware handles shared request checks outside controller logic.
Other ways it was asked
- “What is middleware in Laravel, and what is it used for?”
- “Why is middleware used in a Laravel application?”
What is Blade, and how do you use it to render pages in a PHP application?
Asked in 3 of 39 interviews · last asked Apr 9 · Concept · Junior
Show answer
Blade is Laravel’s template engine for creating HTML pages on the server. You write templates in `.blade.php` files and return `view()` from a route or controller, passing any data the page needs. Blade compiles templates into PHP; it does not require Vue or JavaScript.
- Directives such as `@if` and `@foreach` control what the template displays.
- Layouts and components let you reuse page structure.
- `{{ $value }}` escapes HTML; `{!! $value !!}` outputs raw HTML and is unsafe for untrusted input.
Coderoutes/web.php: <?php use Illuminate\Support\Facades\Route; Route::get('/', fn () => view('home', ['name' => 'Sam'])); resources/views/home.blade.php: <h1>Hello, {{ $name }}</h1>What the interviewer checks: The interviewer checks whether you understand server-side templates, passing data to views, and safe HTML output.
Other ways it was asked
- “What is Blade in Laravel?”
- “What is a Blade directive in Laravel?”
- “What are template engines such as Blade used for, and how are they used in a PHP application without Vue?”
What is WordPress, and how do developers use it?
Asked in 3 of 39 interviews · last asked Aug 27 · Concept · Junior
Show answer
WordPress is an open-source content management system built with PHP and a MySQL or MariaDB database. Developers use it to build and maintain websites, blogs, and online stores. They create themes for presentation and plugins for features, using WordPress APIs and hooks without changing its core files.
- Themes control presentation; plugins add or change features.
- Actions run code at specific points; filters change values passed through them.
- The admin dashboard lets users manage content without writing code.
- Avoid editing core files because updates can overwrite changes.
What the interviewer checks: The interviewer is checking whether you understand WordPress and how developers customize it safely.
Other ways it was asked
- “What is WordPress?”
- “What is WordPress, and how is it used by a developer?”
- “Tell me about WordPress development.”
What is the difference between == and === in PHP, and what problems can using the wrong operator cause?
Asked in 2 of 39 interviews · last asked Mar 27 · Concept · Junior
Show answer
In PHP, == compares values and may convert types, while === requires matching types and values. I use === by default and == only when type conversion is intended. The wrong operator can cause validation or security bugs, such as treating a valid zero result as false.
- The string '5' equals the integer 5 with ==, but not with ===.
- Functions like strpos() can return either zero or false; use === to tell them apart.
- Some loose comparison rules changed in PHP 8, especially comparisons between numbers and non-numeric strings.
Code<?php $position = strpos('PHP', 'P'); // Returns 0: found at the start. var_dump($position == false); // true: wrongly suggests not found. var_dump($position === false); // false: correctly means it was found.What the interviewer checks: The interviewer checks whether you understand type conversion and can avoid bugs when values have different types.
Other ways it was asked
- “In PHP, what's the difference between == and ===, and when would you use each?”
- “What is the difference between the == and === comparison operators in PHP?”
- “What problems can result from choosing the wrong comparison operator in PHP? Give a practical example.”
What data types does PHP support, how are they grouped, and how do those groups differ?
Asked in 2 of 39 interviews · last asked May 31 · Concept · Junior
Show answer
PHP’s basic value types are traditionally grouped as scalar, compound, and special. Scalar types hold single values: bool, int, float, and string. Compound types hold collections or structured data: array and object. Special types are null, meaning no value, and resource, which refers to an external resource such as an open file.
- PHP is dynamically typed: a variable can hold values of different types over time.
- PHP arrays are ordered maps and can contain values of different types.
- Objects are class instances with properties and methods.
- Some newer PHP APIs return objects where older versions returned resources.
Code<?php $active = true; // bool $count = 3; // int $price = 9.50; // float $name = 'Sam'; // string $items = ['book', 2]; // array $user = (object) ['name' => 'Sam']; // object $missing = null; // nullWhat the interviewer checks: The interviewer is checking whether you know PHP’s basic types and can explain how their values differ.
Other ways it was asked
- “What data types are available in PHP, how are they grouped, and what is the fundamental difference between those groups?”
- “What are PHP data types? Name a few, and share some examples.”
How does PHP handle errors, and which constructs can you use for error handling?
Asked in 2 of 39 interviews · last asked Aug 12 · Concept · Mid-level
Show answer
PHP reports errors and supports exceptions for failures that code can catch. Use try, catch, finally, and throw for exception handling. In PHP 7 and later, Throwable covers both Exception and Error objects. Use set_error_handler() for supported PHP errors and set_exception_handler() for uncaught exceptions.
- Warnings and notices are not automatically exceptions; a custom error handler can convert them to ErrorException.
- set_error_handler() cannot handle every error type, including E_ERROR and E_PARSE.
- Use error_reporting() to select error levels; log errors rather than display them in production.
- Use finally for cleanup after try and catch.
What the interviewer checks: The interviewer checks whether you understand PHP errors, exceptions, and which handling tools apply to each.
Other ways it was asked
- “How do you handle errors and exceptions in PHP?”
What are service providers in Laravel?
Asked in 2 of 39 interviews · last asked Apr 1 · Concept · Junior
Show answer
Service providers are classes that set up Laravel’s core features and your application’s services. The register() method binds services into the service container. The boot() method runs after all providers are registered, so it can use those services to finish setup.
- Use register() for container bindings, not routes or event listeners.
- Use boot() for setup such as view composers or event listeners.
- Laravel calls these methods during application startup.
What the interviewer checks: The interviewer is checking whether you understand application startup, container bindings, and the difference between register() and boot().
How do Eloquent's hasOne, hasMany, belongsTo, and belongsToMany relationships work, and when would you use each?
Asked in 2 of 39 interviews · last asked May 5 · Concept · Mid-level
Show answer
`hasOne` links a model to one related record, such as a user’s profile. `hasMany` links it to several records, such as a user’s posts. `belongsTo` links a record to its parent, such as a post’s author. `belongsToMany` links many records on both sides through a pivot table, such as users and roles.
- `hasOne` and `hasMany` expect the foreign key on the related table.
- `belongsTo` expects the foreign key on the current model’s table; it reverses `hasOne` or `hasMany`.
- `belongsToMany` uses a pivot table containing foreign keys for both models.
- `hasOne` does not enforce database uniqueness; add a unique constraint to enforce one-to-one.
What the interviewer checks: The interviewer checks whether you can choose the right relationship and explain where its foreign keys belong.
Other ways it was asked
- “What is a one-to-many relationship in Laravel?”
- “In Laravel, what's the difference between has, has many, belongs to, and belongs to many, and when would you choose each?”
How would you structure a large Laravel application with many modules?
Asked in 2 of 39 interviews · last asked May 15 · Design · Senior
Show answer
I would group code by business module, such as Orders, Billing, and Inventory. Each module would keep its controllers, business logic, and data access together, with clear boundaries. I would keep controllers thin, define how modules communicate, and test each module separately. I would start with one application and extract packages only when needed.
- Organize around business features, not only folders for controllers, models, and services.
- Use explicit service interfaces or events between modules; avoid circular dependencies.
- Keep shared code small and limited to genuinely common needs.
- Register module routes and bindings through service providers, and follow Composer autoloading rules.
Codeapp/ Modules/ Orders/ Http/Controllers/ Actions/ Models/ Providers/OrdersServiceProvider.php routes.php tests/ Feature/Orders/What the interviewer checks: The interviewer is checking whether you can keep a growing application easy to change, test, and maintain.
Other ways it was asked
- “How would you organize the folder structure of a Laravel project that grows to 10, 20, or 30 modules?”
- “How would you structure a large or complex application built with Laravel?”
How does PHP handle concurrency?
Asked in 2 of 39 interviews · last asked Jul 27 · Concept · Senior
Show answer
PHP usually handles concurrent web requests through separate PHP-FPM worker processes. Each worker normally handles one request at a time, running synchronous code. To handle multiple tasks concurrently, I can use multiple queue workers, separate processes, or an asynchronous library such as ReactPHP.
- Multiple worker processes can run tasks in parallel.
- Async libraries overlap waiting for I/O; they do not automatically run CPU work in parallel.
- Use database locks or atomic updates to protect shared data from race conditions.
What the interviewer checks: The interviewer checks whether you understand request concurrency, task concurrency, and safe access to shared data.
Other ways it was asked
- “Can you give an example of how concurrency can be handled in PHP?”
- “How does PHP handle concurrency when multiple tasks need to run at once?”
In a CodeIgniter application using HMVC, how would you organize a payment inquiry and registration feature across the controller, model, and view?
Asked in 2 of 39 interviews · last asked Oct 20 · Tooling · Mid-level
Show answer
I would create a payments module with its own controllers, models, and views. The controller checks access, validates input, calls the model, and selects a view. The model retrieves payment details for inquiry and saves registration records. Views display forms, payment details, and success or error messages.
- Keep database queries in models, not controllers or views.
- Use a transaction when registration updates several related records.
- Prevent duplicate registrations with a unique payment reference enforced by the database.
- HMVC support and module paths depend on the CodeIgniter version and extension.
What the interviewer checks: The interviewer checks whether you can group related features into a module while keeping controller, model, and view responsibilities separate.
Other ways it was asked
- “In a CodeIgniter application using HMVC, how would you organize a payment inquiry and registration feature, and divide responsibilities among controllers, models, and views?”
When does a finally block run in PHP, and does it execute whether or not an error occurs?
Asked once · last asked Mar 27 · Concept · Mid-level
Show answer
A finally block runs after the try block and any matching catch block, whether an exception occurs or not. It also runs before a return completes or an uncaught exception continues outward. However, it does not run if exit(), die(), or a fatal error stops the script immediately.
- Use finally for cleanup, such as closing files or releasing locks.
- A return inside try or catch still triggers finally.
- In PHP 7+, thrown Error objects also trigger finally as the stack unwinds.
- A return inside finally overrides a return from try or catch.
What the interviewer checks: The interviewer checks whether you understand cleanup flow and the limits of saying finally always runs.
What is the difference between Composer install and Composer update, and how do they work?
Asked once · last asked Mar 27 · Tooling · Mid-level
Show answer
With a lock file, `composer install` installs the exact dependency versions in `composer.lock`. Without one, it resolves versions from `composer.json` and creates a lock file. `composer update` resolves versions allowed by `composer.json`, updates the lock file, and installs them. Use install for repeatable builds and update for planned dependency changes.
- `composer.json` defines version constraints; `composer.lock` records exact versions, including indirect dependencies.
- Update selects compatible versions, not necessarily the newest versions available.
- Commit the lock file for applications so teammates and deployments use the same versions.
- Use `composer update vendor/package` to target a specific package.
What the interviewer checks: The interviewer checks whether you can manage dependency changes while keeping builds repeatable.
What are some PHP superglobal variables? Give examples and explain their benefits.
Asked once · last asked May 22 · Concept · Junior
Show answer
PHP superglobals are built-in variables available in every scope, including inside functions. Examples include `$_GET` for URL query parameters, `$_POST` for form data, `$_SERVER` for request and server details, and `$_SESSION` for session data. They let functions access this data without passing it as arguments or using `global`.
- `$_COOKIE` contains request cookies; `$_FILES` contains uploaded file details.
- `$_POST` handles supported form submissions, not raw JSON bodies.
- Start or resume a session before using `$_SESSION`, usually with `session_start()`.
- Validate user input from superglobals, and escape it correctly when displaying it.
What the interviewer checks: The interviewer checks whether you know common superglobals, their scope, their uses, and how to handle input safely.
Why would you use PHP's usort() function?
Asked once · last asked Jul 27 · Concept · Mid-level
Show answer
I use usort() to sort an array with custom comparison rules, such as sorting records by price or name. For JSON data, I first decode it into a PHP array. Unlike sort(), usort() lets me choose which fields to compare and in what order.
- The comparison function returns a negative integer, zero, or a positive integer to set the order.
- usort() changes the original array and replaces its keys with numeric indexes starting at zero.
- Use uasort() instead if you need to keep the original keys.
What the interviewer checks: The interviewer is checking whether you can choose a custom sort and understand its comparison rules and key handling.
Other ways it was asked
- “Why would you use PHP's usort() instead of a simpler approach when working with JSON data?”
Does PHP have a char data type?
Asked once · last asked Mar 27 · Concept · Junior
Show answer
No, PHP has no separate char data type. A single character is stored as a string. PHP strings hold bytes, so a Unicode character may take more than one byte.
- A value like 'A' is a string, not a char.
- String indexing returns one byte, which may not be a complete Unicode character.
- Use mb_substr with the correct encoding to extract a multibyte character.
What the interviewer checks: The interviewer is checking whether you know PHP's types and the difference between bytes and characters.
How are arrays classified in PHP's type system?
Asked once · last asked Mar 27 · Concept · Junior
Show answer
Arrays are a compound data type in PHP. A PHP array is an ordered map with integer or string keys. It can hold values of different types, including other arrays.
- Indexed and associative arrays use the same array type.
- Multidimensional arrays are arrays containing other arrays.
- PHP arrays are not objects.
What the interviewer checks: The interviewer is checking whether you know how PHP classifies arrays and what they can store.
Other ways it was asked
- “What data type are arrays in PHP?”
What is Composer, and what is it used for in PHP projects?
Asked once · last asked Mar 27 · Tooling · Junior
Show answer
Composer is a dependency manager for PHP. It installs the libraries a project needs and resolves compatible versions of their dependencies. It also generates an autoloader, so you can use library classes without loading each file yourself.
- composer.json lists the project's dependencies and version constraints.
- composer.lock records exact versions so installations stay consistent.
- composer install uses locked versions when available; composer update resolves versions again and updates the lock file.
- Composer supports autoloading for both library classes and your own project classes.
What the interviewer checks: The interviewer is checking whether you understand how PHP projects manage libraries, versions, and autoloading.
What are the differences between PHP and Java?
Asked once · last asked Sep 8 · Concept · Junior
Show answer
PHP is dynamically typed and mainly used for server-side web development. Java is statically typed and used for web services, desktop software, and other applications. Java compiles to bytecode that runs on the JVM, while PHP typically compiles scripts to opcodes that its own engine runs.
- PHP supports optional type declarations, but it is still dynamically typed.
- Java checks types during compilation; PHP checks declared types during execution.
- Both support classes, inheritance, interfaces, and exceptions.
- Neither language is always faster; performance depends on the application, runtime, and configuration.
What the interviewer checks: The interviewer is checking whether you understand typing, execution models, and common uses of both languages.
What is a stream in PHP?
Asked once · last asked Apr 9 · Concept · Mid-level
Show answer
A stream in PHP is a way to read or write data through a common interface. It lets functions such as fopen(), fread(), and fwrite() work with files, network connections, and memory. Stream wrappers define how PHP accesses sources such as file://, php://, or http://.
- A stream handle is usually a resource returned by functions such as fopen().
- Streams can process data in chunks without loading everything into memory.
- Supported operations depend on the wrapper; not every stream supports writing or seeking.
What the interviewer checks: The interviewer checks whether you understand PHP’s shared interface for reading and writing different data sources.
PHP basics interview questions
Check PHP uses, types, arrays, operators, superglobals, includes, error handling, Composer, and how PHP compares with Java. 15 questions.
What types of operators does PHP support, and can you give examples of their use?
Asked once · last asked May 22 · Concept · Junior
Other ways it was asked
- “What are some types of operators in PHP?”
- “Give an example of a PHP operator and explain where you would use it.”
What is PHP, and what is it mainly used for?
Asked once · last asked May 31 · Concept · Junior
What is the difference between include and include_once?
Asked once · last asked Oct 12 · Concept · Junior
PHP OOP and PHP 8 interview questions
Questions cover classes, interfaces, access modifiers, magic methods, object lifecycles, copy-on-write, and modern PHP features. 12 questions.
How does PHP's copy-on-write behavior affect arrays and strings passed to methods?
Asked once · last asked Mar 27 · Concept · Mid-level
Other ways it was asked
- “If a PHP method modifies an array it receives, do those changes affect the array in the calling code?”
- “If a PHP method modifies a string it receives, do those changes affect the string in the calling code?”
- “What is copy-on-write in PHP, and how does it affect array and string behavior when values are passed to methods?”
What are abstract classes and interfaces in PHP, and when would you use one instead of the other?
Asked once · last asked Mar 27 · Concept · Mid-level
Which magic methods are available in PHP, and when are they called?
Asked once · last asked Mar 27 · Concept · Mid-level
When does a PHP object's destructor run, and how can you trigger its cleanup?
Asked once · last asked Mar 27 · Concept · Mid-level
Other ways it was asked
- “When is a PHP destructor called, and how does it work?”
- “How can you trigger a PHP object's destructor so that its cleanup logic runs?”
Since PHP does not allow two methods with the same name in one class, how can you implement method overloading in PHP? Is there an alternative or a specific magic method for it?
Asked once · last asked May 22 · Concept · Mid-level
Is there a shorter way to declare properties and assign them in a PHP constructor?
Asked once · last asked Jul 27 · Concept · Junior
What is the match expression in PHP, and how does it differ from a switch statement?
Asked once · last asked Aug 11 · Concept · Mid-level
In PHP, what is the difference between self, static, and $this?
Asked once · last asked Aug 12 · Concept · Mid-level
In PHP, what are read-only properties and read-only classes, and how do they differ?
Asked once · last asked Aug 12 · Concept · Mid-level
Which major PHP 8 features do you find useful, and why?
Asked once · last asked Sep 23 · Concept · Mid-level
Other ways it was asked
- “Which major PHP 8 features have you liked and used?”
Can an abstract class in PHP implement an interface?
Asked once · last asked Mar 27 · Concept · Junior
What are the different access modifiers in PHP?
Asked once · last asked May 5 · Concept · Junior
Laravel basics interview questions
Review Laravel's request lifecycle, service providers, middleware, route groups, Blade, Artisan, and exception handling. 8 questions.
How do you handle exceptions in Laravel?
Asked once · last asked May 5 · Tooling · Mid-level
When should you apply middleware to a Laravel route group versus to individual routes?
Asked once · last asked Jul 31 · Concept · Mid-level
Explain the Laravel request lifecycle.
Asked once · last asked Aug 12 · Concept · Mid-level
What is Artisan in Laravel?
Asked once · last asked Mar 12 · Concept · Junior
What is Laravel?
Asked once · last asked Jul 30 · Concept · Junior
Laravel Eloquent and database interview questions
Explore database connections, PDO, migrations, seeders, Eloquent relationships, mass assignment, query loading, transactions, and concurrent updates. 10 questions.
What MySQL locking or transaction strategies would you use to ensure data consistency when multiple PHP workers update the same rows concurrently?
Asked once · last asked Mar 26 · Scenario · Senior
Other ways it was asked
- “How do you ensure data consistency when multiple PHP workers may update the same rows concurrently? What locking or transaction strategies do you use in MySQL?”
In an MVC PHP app, where do you place transaction boundaries—controller, service layer, repository, or middleware—and why?
Asked once · last asked Mar 26 · Concept · Senior
Does PDO use the Singleton pattern by default?
Asked once · last asked Apr 9 · Concept · Mid-level
Other ways it was asked
- “What would you do to make PDO work as a Singleton in a PHP application?”
In Eloquent, what's the difference between lazy loading, eager loading with with, and lazy eager loading with load, and when would you use each?
Asked once · last asked May 5 · Concept · Mid-level
In Laravel and Eloquent, how do you prevent or detect N+1 queries in production, and what tools or patterns do you rely on?
Asked once · last asked May 5 · Scenario · Senior
How do you use migrations and seeders to create database tables and populate initial data?
Asked once · last asked May 5 · Tooling · Junior
Other ways it was asked
- “How would you create database tables and insert default data in a Laravel, PHP, or Node.js application?”
- “When would you use a seeder, and when would you use a migration?”
What are fillable and guarded in Laravel?
Asked once · last asked May 22 · Concept · Junior
What does the `php artisan migrate` command do?
Asked once · last asked Mar 12 · Concept · Junior
What information is required to connect a Laravel application to a database?
Asked once · last asked May 5 · Tooling · Junior
PHP and Laravel API and security interview questions
These questions cover REST, validation, sessions, authentication, authorization, SQL injection, payment integrations, idempotency, and S3 uploads. 19 questions.
When validating input in PHP, how do you decide between using isset, empty, and is_null to check whether a value is present and valid?
Asked once · last asked Mar 26 · Concept · Mid-level
When designing a REST endpoint in PHP to update a resource, how do you decide between PUT and PATCH, and what should each mean semantically?
Asked once · last asked Mar 26 · Concept · Mid-level
When designing a RESTful API endpoint in PHP to create a resource, which HTTP method and typical success status code do you use, and what should the response include?
Asked once · last asked Mar 26 · Concept · Junior
In a PHP API integrating a third-party service, how do you design retries and timeouts to avoid duplicate side effects, such as double charging, and what role does idempotency play?
Asked once · last asked Mar 26 · Design · Senior
What is a session, how does it work in a monolithic PHP application, and what session-handling practices help keep it secure?
Asked once · last asked Apr 9 · Concept · Mid-level
How should a PHP application regenerate session IDs after logout or when a different user logs in?
Asked once · last asked Apr 9 · Scenario · Mid-level
In Laravel, how do you typically implement JWT-based authentication and role-based access control? What belongs in guards and providers, middleware, and policies or gates?
Asked once · last asked May 5 · Tooling · Senior
How do you handle JWT token revocation or blacklisting and refresh tokens in Laravel, especially when a user logs out or a token is compromised?
Asked once · last asked May 5 · Tooling · Senior
In Laravel, how would you enforce idempotency for a POST endpoint, such as creating a payment, to prevent duplicate processing during retries or timeouts?
Asked once · last asked May 5 · Scenario · Senior
Where would you persist the idempotency key and associated response in the Laravel schema, and what unique constraint would you add to prevent duplicates?
Asked once · last asked May 5 · Design · Senior
How would you sanitize user input in PHP?
Asked once · last asked May 5 · Tooling · Mid-level
Other ways it was asked
- “How have you sanitized user input in PHP?”
How would you integrate a payment gateway with Laravel?
Asked once · last asked May 5 · Tooling · Mid-level
Show 7 more
Could you explain step by step how to upload an image from a local desktop to an S3 bucket using Laravel or PHP?
Asked once · last asked May 5 · Tooling · Mid-level
How can SQL injection be prevented, and what does Laravel provide to handle it?
Asked once · last asked May 22 · Concept · Mid-level
How would you implement OAuth sign-in with Google or Outlook in Laravel?
Asked once · last asked Jul 16 · Tooling · Mid-level
Other ways it was asked
- “How would you implement OAuth authentication in Laravel for users signing in with Google?”
- “How would you authenticate users in Laravel with Google or Outlook accounts?”
In a Laravel application with 200 or more API endpoints, how would you make a common `product_key` parameter mandatory without adding validation to every endpoint?
Asked once · last asked Jul 31 · Scenario · Mid-level
How do you connect a Laravel application to Amazon S3?
Asked once · last asked Jul 31 · Tooling · Mid-level
When implementing Stripe subscriptions in Laravel, how would you choose between the Stripe SDK and custom integration code, and what would you use for SMS and email notifications?
Asked once · last asked Aug 11 · Tooling · Mid-level
What is the difference between building RESTful APIs in Laravel and integrating with third-party APIs?
Asked once · last asked May 5 · Concept · Mid-level
Laravel architecture and design patterns interview questions
Think through Laravel project structure, dependency injection, repositories, services, actions, traits, multitenancy, and complex feature design. 9 questions.
What are the responsibilities of a controller, service, repository, and action in Laravel, and when would you use each?
Asked once · last asked Feb 10 · Concept · Mid-level
How would you use dependency injection in Laravel, for example to inject a service or a built-in Laravel service?
Asked once · last asked Feb 10 · Concept · Mid-level
How would you resolve the tenant for each request in a multitenant Laravel application?
Asked once · last asked Feb 10 · Tooling · Senior
What is multitenancy in Laravel, and when would you use it?
Asked once · last asked Jul 16 · Concept · Mid-level
What is the repository pattern in Laravel, and what are its benefits?
Asked once · last asked Jul 16 · Concept · Mid-level
What are the differences between traits and service classes in Laravel, and when would you use each?
Asked once · last asked Jul 16 · Concept · Mid-level
How would you approach developing a complex backend feature using PHP and Laravel, including overcoming key technical challenges?
Asked once · last asked Aug 10 · Behavioral · Mid-level
Other ways it was asked
- “Describe a complex back end feature you developed using PHP and Laravel. What were the key challenges, and how did you overcome them?”
How are design patterns used in Laravel?
Asked once · last asked Sep 23 · Concept · Mid-level
PHP concurrency and Laravel queues interview questions
Work through questions on asynchronous execution, messaging, queue setup, jobs, bulk email, batching, progress tracking, and rate limits. 12 questions.
How would you implement messaging in PHP, configure the project, and choose design patterns?
Asked once · last asked Mar 9 · Design · Mid-level
How would you handle a third-party API's 429 Too Many Requests responses in PHP, including immediate backoff, respecting Retry-After, and system-wide throttling or queuing to prevent repeated rate-limit errors?
Asked once · last asked Mar 26 · Scenario · Senior
Other ways it was asked
- “When a third-party API rate-limits you, how do you handle 429 Too Many Requests in PHP? What do you do immediately for that request, such as backing off and respecting Retry-After, and what system-wide throttling or queuing do you implement to prevent repeated 429 responses?”
How can you run a long-running process asynchronously in PHP?
Asked once · last asked Apr 9 · Scenario · Mid-level
If an e-commerce site receives 100 orders per minute, how would you process them as a PHP or Laravel developer?
Asked once · last asked May 5 · Design · Mid-level
How would you coordinate Laravel commands and queued jobs to reliably send email to millions of users?
Asked once · last asked Jul 16 · Scenario · Senior
Other ways it was asked
- “How would you send email to one million users in Laravel reliably, without the process being interrupted?”
- “How would you coordinate Laravel commands and queued jobs to process millions of records and send email at scale?”
How would you process recipient batches and send email data in a Laravel bulk-email workflow?
Asked once · last asked Jul 16 · Scenario · Senior
When processing users in batches of 5,000 in Laravel, should all batches be handled in one execution or across multiple executions?
Asked once · last asked Jul 16 · Scenario · Senior
How would you track batches in a Laravel bulk-email workflow so that later executions send emails only to recipients who have not yet received them?
Asked once · last asked Jul 16 · Scenario · Senior
How do you choose and configure a queue strategy for a Laravel application?
Asked once · last asked Jul 16 · Tooling · Senior
What is Laravel's queue system?
Asked once · last asked Mar 12 · Concept · Junior
Where should you run Laravel jobs, and when would you use the CLI, Tinker, or another execution method?
Asked once · last asked Jul 16 · Tooling · Mid-level
PHP and Laravel performance and maintenance interview questions
Topics include benchmarking, slow queries, memory, Redis, caching, PHP-FPM, monitoring, older applications, upgrades, and migrations. 12 questions.
In a high-traffic PHP app using MySQL, what steps would you take to diagnose and reduce slow requests caused by database access?
Asked once · last asked Mar 26 · Scenario · Senior
How would you investigate a PHP memory leak in a long-running process whose memory usage keeps increasing?
Asked once · last asked Mar 27 · Scenario · Senior
How would you handle a large PHP array that needs to be cleared periodically?
Asked once · last asked Mar 27 · Scenario · Mid-level
How would you approach a maintenance task such as upgrading PHP on a legacy client server?
Asked once · last asked May 12 · Scenario · Mid-level
How would you benchmark a Laravel application to determine how many requests it can handle per second?
Asked once · last asked May 25 · Scenario · Mid-level
What is Redis and how do you use Redis in Laravel?
Asked once · last asked Jul 16 · Tooling · Mid-level
How would you investigate and take ownership of a legacy PHP system?
Asked once · last asked Jul 22 · Behavioral · Senior
Other ways it was asked
- “Walk me through how you investigated and took ownership of a legacy PHP system.”
How would you ensure feature parity when migrating a legacy PHP system?
Asked once · last asked Jul 22 · Behavioral · Senior
Other ways it was asked
- “How did you ensure feature parity when migrating a legacy PHP system?”
- “What tools or strategies did you use to ensure a new service matched a legacy PHP system during migration?”
How would you migrate a business-critical system from legacy PHP to the latest version of Ruby on Rails without disrupting it?
Asked once · last asked Aug 20 · Scenario · Senior
How do you address monitoring and security in PHP application code to support maintainability and security?
Asked once · last asked Sep 23 · Scenario · Senior
What is the difference between PHP-FPM and PHP-CGI, and how do you configure them?
Asked once · last asked Oct 12 · Tooling · Mid-level
What performance optimizations do you apply in PHP and databases?
Asked once · last asked Oct 20 · Scenario · Senior
WordPress, Magento and other PHP framework interview questions
Platform questions cover WordPress development and file protection, Magento internals and search, Shopware comparisons, CodeIgniter features, Bitrix, and Solarium. 30 questions.
What is the difference between Magento and Shopware?
Asked once · last asked Apr 27 · Concept · Mid-level
Other ways it was asked
- “What are five differences between Shopware and Magento?”
How do Bitrix agents compare with Laravel queues?
Asked once · last asked Oct 12 · Concept · Mid-level
Other ways it was asked
- “What capabilities do Laravel queues provide that Bitrix agents lack?”
What product types are available in Magento?
Asked once · last asked Apr 27 · Concept · Junior
Other ways it was asked
- “What types of plugins are available in Magento?”
What is the difference between grouped products and bundle products in Magento?
Asked once · last asked Apr 27 · Concept · Junior
What is an interceptor in Magento, and what is it used for?
Asked once · last asked Apr 27 · Concept · Mid-level
How can you control the execution order of plugins in Magento?
Asked once · last asked Apr 27 · Concept · Mid-level
What should a before plugin return in Magento?
Asked once · last asked Apr 27 · Concept · Mid-level
Why should you avoid overusing around plugins in Magento?
Asked once · last asked Apr 27 · Concept · Mid-level
Can a Magento plugin intercept a protected method?
Asked once · last asked Apr 27 · Concept · Senior
What is the difference between a Factory and a Proxy in Magento?
Asked once · last asked Apr 27 · Concept · Mid-level
What are virtual types in Magento, and what are they used for?
Asked once · last asked Apr 27 · Concept · Senior
How does Magento determine which class to instantiate for an interface declared in a constructor, and where is that mapping configured?
Asked once · last asked Apr 27 · Concept · Senior
Show 16 more
What are the main execution areas in Magento?
Asked once · last asked Apr 27 · Concept · Mid-level
What happens in Magento when a user enters a search query on the site and presses Enter?
Asked once · last asked Apr 27 · Scenario · Senior
What data does Elasticsearch return to Magento, and what problem does Elasticsearch solve?
Asked once · last asked Apr 27 · Concept · Mid-level
If Elasticsearch returns only product IDs, how does Magento load the corresponding products and return them to the frontend?
Asked once · last asked Apr 27 · Concept · Senior
How is a GraphQL schema structured in Magento, and what does it describe?
Asked once · last asked Apr 27 · Concept · Mid-level
What is Solarium, and how does it work with Apache Solr?
Asked once · last asked May 25 · Concept · Mid-level
How does the WordPress REST API work?
Asked once · last asked Jun 4 · Concept · Mid-level
How do GET and POST requests differ from WordPress's WP_Query?
Asked once · last asked Jun 4 · Concept · Mid-level
Other ways it was asked
- “What is the difference between GET and POST requests, and how does WP_Query work?”
How do you add an endpoint in WordPress?
Asked once · last asked Jun 4 · Tooling · Mid-level
How would you enforce access checks for protected content in WordPress?
Asked once · last asked Jul 16 · Tooling · Senior
Other ways it was asked
- “In WordPress, exactly how would you enforce those checks for protected content?”
How would you prevent unauthorized direct access to uploaded files in WordPress?
Asked once · last asked Jul 16 · Tooling · Senior
Other ways it was asked
- “What concrete mechanism would you use in WordPress to restrict access to specific uploaded files without relying on obscurity or guessable URLs?”
For protected file downloads in WordPress, would you use a custom rewrite endpoint, a REST API route, or admin-ajax.php, and why?
Asked once · last asked Jul 16 · Concept · Senior
How do you implement caching in Bitrix?
Asked once · last asked Oct 12 · Tooling · Mid-level
How would you identify where to make changes when adding a payment method to a PHP system built with CodeIgniter 3, and implement it without affecting existing payment methods?
Asked once · last asked Oct 20 · Scenario · Senior
How does dependency injection work in Magento when creating objects and supplying constructor dependencies?
Asked once · last asked Apr 27 · Concept · Senior
Other ways it was asked
- “What is dependency injection in Magento?”
- “How does Magento create an object and pass it the dependencies declared in its constructor?”
What is Advanced Custom Fields (ACF) in WordPress, and what is it used for?
Asked once · last asked Jun 4 · Concept · Mid-level
Live coding round next? Coding mode in the MeetAssist desktop app solves the problem on your screen, with your phone as the remote.
Related interview questions
- Software Engineer interview questions
- Cloud Engineer interview questions
- IT Support and Help Desk interview questions
- Python interview questions
- Java interview questions
- JavaScript interview questions
- TypeScript interview questions
- C# and .NET interview questions
- C++ interview questions
How this list is made
Every question here was asked by a real interviewer in a real job interview that a candidate ran MeetAssist in. After the call, the interviewer's questions are pulled from the transcript. Practice sessions, tests, exams and anything that was not a job interview are dropped.
Questions are rewritten so they make sense on their own: names of people, employers and clients are removed, and speech-to-text mistakes are fixed. Small talk, logistics and questions about one candidate's own résumé are left out. Rephrasings of the same question are merged, and the count is the number of different interviews it came up in.
The interviews come from candidates who use MeetAssist, so they lean towards software, data and AI roles: the shares describe these interviews, not every PHP and Laravel interview. Answers to the most asked questions are written and checked by an editor; a "common mistake" is shown only when reviews of real answers in these interviews show it, with the count.
39 interviews, 23 candidates, Sep 2025 to Oct 2026. Updated every month with new interviews.
Or add the Chrome extension