Question Bank
3705 approved questions from the community
PHP constants should ideally be defined at the beginning of a script to ensure consistent values.
The E_RECOVERABLE_ERROR type indicates major issues that still allow script execution to continue.
PHP scripts execute from bottom to top unless there's a redirect, error, or exit.
A constant's value can be changed after it has been defined in PHP.
Constants in PHP have global scope and can be accessed from any part of the code.
What is the purpose of the `req.originalUrl` property?
What HTTP status code should be returned when a resource is successfully created?
How do you implement WebSocket support in an Express.js application?
The `res.location()` method sets the Location header but does not send a response.
Express.js applications can be tested using frameworks like Jest or Mocha.
Express.js can handle Server-Sent Events (SSE) for real-time updates without additional libraries.
The `req.secure` property indicates whether the request was made over HTTPS.
How do you set custom HTTP response headers in Express.js?
What is the purpose of the `req.baseUrl` property?
Which method is used to specify a view engine in Express.js?
Express.js middleware can modify the `req` object to pass data between middlewares in the chain.
The `res.attachment()` method sets the Content-Disposition header to trigger file downloads.
Express.js is the only web framework available for Node.js.
What does the morgan middleware do in Express.js?
What is the difference between res.redirect(301) and res.redirect(302)?