Senior PHP JavaScript Interview

This note sets out a senior software engineer interview for a PHP and JavaScript role on Laravel 8 and above. It opens with the eight part outline used in the session, from greeting and company research to closing, and marks where the candidate struggled. Coding proficiency and git rebase were the weak points, while refactoring and adaptability were covered in depth. The technical section then groups the actual questions by topic. Frameworks and databases, testing and the testing pyramid, REST API traits, frontend frameworks, design patterns, security, modern CSS, DevOps, and the monolith versus microservices tradeoff all appear. Two closing notes remind you to credit Laravel and follow naming conventions.

Position: Senior Software Engineer (PHP, JavaScript) - Laravel 8+

Interview Outline

  1. Greeting, learning about the company, the future
  2. Time management, ticket management
  3. Refactoring skills: Read messy code, refactor it to be maintainable, design patterns
  4. Coding Proficiency: Algorithms and data structures (failed)
  5. System Design and Optimization: Design a multimedia streaming system, caching (Redis/Elasticsearch)
  6. Version Control Discipline: Git, not familiar with rebase
  7. Adaptability: Working with an existing codebase, what to do first when starting
  8. Goodbye (1h30m total)

Technical Questions

Frameworks & Databases

  • Experience working with JavaScript frameworks?
  • When do you use MySQL or MongoDB? Which do you prefer working with?
  • Compare Yii2, Symfony, and Laravel - which framework interacts with the database best? ActiveRecord, Doctrine ORM, Eloquent?

Testing

  • How many kinds of tests are there? What is the Testing Pyramid?
  • Should developers write tests, or the QA team?

API

  • Experience with RESTful APIs?
  • What characteristics define a RESTful API?
  • Which of those characteristics have you applied in your current app?
  • Is REST the only kind of API? Does it work only over HTTP?

Frontend

  • What is the difference between jQuery and React/Vue/Angular?
    • Expected: jQuery manipulates the DOM directly, while the frameworks work with a virtual DOM

Design Patterns

  • Do you know design patterns? Name a few
  • Why is the singleton an anti-pattern? Its strengths and weaknesses?

Security

  • Common security flaws when coding?
    • Expected: SQL Injection; Laravel provides CSRF protection

CSS

  • Experience with modern CSS (flexbox, grid)?

DevOps

  • What is the difference between OpenShift and AWS ECS?

Architecture

  • When to use a monolith and when microservices? Analyze the pros and cons

Notes

  • Praise Laravel for enabling fast app delivery and proof-of-concepts
  • Follow conventions: name Models and tables to the standard

See also: Interview Senior Engineer · Laravel Interview Questions · Top 10 System Design And Microservices Questions