Backend Php Developer Interview Questions

98 backend php developer interview questions shared by candidates

Principles: KISS, DRY, and YAGNI principles and their relationship Command Query Responsibility Segregation (CQRS) based on my previous experience context Shared context-related code like the Singleton design pattern SOLID principles Loose Coupling vs. Tight Coupling, Inversion of Control mechanism Security: XSS and SQL injection handling, Auth handling security like use of Cookie HttpOnly Best practices for storing JWT shared keys (e.g., session storage or secure-flagged cookies) Testing: Unit tests: Testing state vs. testing interaction, their relation with the maintainability of the code Database: SQL: Different join types, optimizing slow MySQL queries Comparison between DB engines, mainly InnoDB vs. MyISAM Strategies for changing a DB field name in production without disrupting other long running processes (maybe discussing transactional differences between engines) Coding Challenge: Fixing a state test function without using PHPUnit, but with assertions The payload transformation encapsulated within a private function (which we need to test), also called by another log function which call logger->log, the logger was not injected rather created by new, so it need ot be injected as an interface (e.g., PSR LoggerInterface) and creating a concrete logger to output the tested payload and assert with the given input of the test assertion function and maybe others I forgot
avatar

Senior PHP Backend Engineer

Interviewed at Smoobu

4
Apr 9, 2024

Principles: KISS, DRY, and YAGNI principles and their relationship Command Query Responsibility Segregation (CQRS) based on my previous experience context Shared context-related code like the Singleton design pattern SOLID principles Loose Coupling vs. Tight Coupling, Inversion of Control mechanism Security: XSS and SQL injection handling, Auth handling security like use of Cookie HttpOnly Best practices for storing JWT shared keys (e.g., session storage or secure-flagged cookies) Testing: Unit tests: Testing state vs. testing interaction, their relation with the maintainability of the code Database: SQL: Different join types, optimizing slow MySQL queries Comparison between DB engines, mainly InnoDB vs. MyISAM Strategies for changing a DB field name in production without disrupting other long running processes (maybe discussing transactional differences between engines) Coding Challenge: Fixing a state test function without using PHPUnit, but with assertions The payload transformation encapsulated within a private function (which we need to test), also called by another log function which call logger->log, the logger was not injected rather created by new, so it need ot be injected as an interface (e.g., PSR LoggerInterface) and creating a concrete logger to output the tested payload and assert with the given input of the test assertion function and maybe others I forgot

Viewing 41 - 50 interview questions

Glassdoor has 98 interview questions and reports from Backend php developer interviews. Prepare for your interview. Get hired. Love your job.