PHP · recruiter script
PHP screening questions for recruiters
Screening a PHP developer without a technical background. Read each prompt aloud; the rubric tells you what a strong answer sounds like.
1. Explain the difference between `==` and `===` in PHP, and when using the wrong one causes a bug.
- Junior
- Knows `===` also checks type; `==` does loose comparison.
- Senior
- Gives a concrete gotcha (e.g. `0 == 'abc'` behaviour, `in_array` strict flag) and defaults to `===`.
- Red flag
- Thinks they are interchangeable or cannot explain type juggling.
2. How do you prevent SQL injection when a PHP page takes user input?
- Junior
- Mentions escaping or that raw input is dangerous.
- Senior
- Prepared statements / parameterized queries via PDO or mysqli, plus why concatenation fails.
- Red flag
- Suggests manual quoting only, or has not heard of prepared statements.
3. What is Composer and what problem does it solve on a PHP project?
- Junior
- Dependency manager; installs packages.
- Senior
- Autoloading (PSR-4), version constraints, composer.lock reproducibility.
- Red flag
- Confuses it with a build tool for another language or unfamiliar.
Want StepUP to run the whole screen?
These questions are the free version. StepUP runs the full structured PHP interview and returns a scored report.