I'm always excited to take on new projects and collaborate with innovative minds.
Russia, Smolensk
Recently I went through a backend technical interview for a high-load PHP role.
Below are the questions I was asked — along with the correct structured answers.
I’m publishing this to help other developers prepare better.
1️⃣ What HTTP Methods Exist?I initially answered:
GET, POST, PUT, PATCH, UPDATE
Correction:
There is no UPDATE method in HTTP.
GET — Retrieve data
POST — Create resource
PUT — Replace resource
PATCH — Partially update resource
DELETE — Remove resource
OPTIONS — Ask server what methods are allowed
HEAD — Same as GET but without body
OPTIONS is commonly used in CORS preflight requests.
Before sending certain cross-origin requests (like POST with custom headers), the browser sends:
To check:
Allowed methods
Allowed headers
Allowed origin
CORS (Cross-Origin Resource Sharing) is a browser security mechanism that controls whether a frontend from one domain can access resources on another domain.
Server responds with headers like:
This question tests database understanding.
There is no practical scenario where you JOIN 400 tables.
Technically:
MySQL allows up to 61 tables in a JOIN.
PostgreSQL has high limits but performance becomes the real constraint.
But the real point:
Performance depends on indexing, join type, and execution plan — not just the number of joins.
Database engines use:
Nested Loop Join
Hash Join
Merge Join
Performance depends on:
Indexes
Cardinality
Data size
Query plan (EXPLAIN ANALYZE)
This is likely the missing part.
Often interviewers ask:
JOIN or Subquery — which is better?
Correct answer:
It depends on the query and execution plan.
In modern databases:
Many subqueries are optimized into JOINs internally.
Performance should be evaluated using EXPLAIN ANALYZE.
General guideline:
JOIN is often clearer and easier to optimize.
EXISTS subqueries are good for existence checks.
Avoid correlated subqueries when possible.
Never say one is always better.
This tests understanding of Late Static Binding.
Example:
If we call:
self:: is resolved at compile time → refers to class where method is defined.
static:: uses late static binding → refers to the class actually called (B).
Replication is the process of copying data from one database server (primary) to one or more replica servers.
High availability
Read scaling
Disaster recovery
Types:
Asynchronous replication (common)
Synchronous replication
Important concept:
In asynchronous replication, replicas may lag behind the primary.
PHP 8 introduced JIT (Just-In-Time compilation).
But in typical web applications:
Most time is spent in I/O:
Database
Network
Redis
File system
JIT improves CPU-heavy code.
Most web apps are I/O-bound, not CPU-bound.
Therefore:
JIT has minimal impact on typical Laravel/Yii production workloads.
Major changes:
JIT compilation
Union types
Named arguments
Attributes (native annotations)
Match expression
Constructor property promotion
Nullsafe operator (?->)
Weak maps
Example:
Much cleaner than nested checks.
Technical interviews for high-load backend roles focus heavily on:
Database internals
Query planning
Index tradeoffs
Distributed systems basics
Deep understanding of fundamentals
If you're targeting senior backend roles, strengthen:
Index theory (B-Tree)
Join algorithms
Isolation levels
Replication strategies
Query optimization
If this helped you — bookmark it.
More deep backend notes coming soon.
— nsour.ru
Your email address will not be published. Required fields are marked *