Question Bank
721 approved questions from the community
What setting controls the maximum lifetime of a session in PHP?
What is the third parameter of the define() function used for?
Which of the following are recommended practices for preventing malicious code injection? (Select all that apply)
Using $_REQUEST is recommended over $_GET or $_POST for better code maintainability and debugging.
CSPRNG functions in PHP 7/8 provide weaker random number generation compared to PHP 5.
What type of database query should be used to prevent SQL injection attacks?
Using only strip_tags() is sufficient for preventing XSS attacks when displaying user-generated content.
What expression did PHP 8 introduce as a more precise alternative to switch statements?
What new feature did PHP 8 introduce for function parameters?
Which of the following are recommended security measures for PHP sessions? (Select all that apply)
How would you implement custom body parsing middleware for a content type not supported by Express.js?
How do you implement health check endpoints for monitoring Express.js applications?
What is the difference between `app.use()` and `app.all()` in Express.js?
What is the purpose of using process managers like PM2 with Express.js applications?
What is the purpose of the `res.vary()` method?
What is middleware chaining and why is it important in Express.js?
How do you implement distributed sessions in Express.js for load-balanced environments?
How do you implement API versioning in Express.js?
How do you implement pagination in Express.js APIs?
How do optional and catch-all route segments work in Express.js?