Live coding

PHP Interview Copilot

Modern PHP interviews look nothing like the language's reputation — expect strict types, real dependency injection, and questions about the request lifecycle.

The round

What a PHP interview actually looks like

A PHP screen usually mixes a small algorithm with questions about how the language behaves under the hood: how arrays are actually implemented, what happens between requests, how autoloading and the container fit together in whichever framework the team runs. Interviewers often probe whether you have kept up with the last several major versions, since the honest answer to many older interview questions is that the behaviour changed. Teams running Laravel or Symfony usually finish with a question about the service container and when a binding is resolved.

What you get back

Solutions use current PHP — constructor property promotion, typed properties, enums, and strict comparison throughout. Array functions are used where they beat a foreach, and the answer notes that arrays are ordered hash maps rather than lists, since half the tricky questions follow from that. Where behaviour changed between versions, the answer says which version it assumes.

Example prompts

Questions people are actually asked

Send the transcript straight to the coding surface, or snip the problem off the screen.

  • Why does this loose comparison return true?

  • Deduplicate a list of records by a composite key.

  • What survives between two requests, and what does not?

Where candidates lose points

PHP-specific traps

Loose comparison

The double-equals operator's coercion rules are the most-set trap in a PHP screen. Using strict comparison and being able to explain the difference is the whole answer.

Arrays as lists

PHP arrays are ordered maps, so unset leaves gaps in the keys and a later json_encode produces an object rather than an array.

Reference semantics in foreach

A by-reference loop variable that is reused afterwards corrupts the last element, which is a bug interviewers enjoy watching candidates find.

Three surfaces

One workspace, three kinds of round

Chat

Behavioral rounds and the “tell me about a time” half of a technical screen, in your own voice.

Live coding

A structured solution with the reasoning attached, so you can talk through the code while you write it.

System design

Architecture answers with the diagram rendered inline, not described in prose.

Choosing a model

GPT-5.4 Mini is a reasonable default. Because PHP's semantics changed substantially across versions, GPT-5.4 is worth switching to whenever the question is about behaviour rather than output — it is more careful about which version a rule applies to.

Ready for your PHP round?

Start free. No credit card required.