For how long does a session variable persist by default in PHP?
- Until the browser is closed
- Until the server restarts
- For 24 hours
- Until the session ends
By default, session variables in PHP persist until the session ends. This typically happens when the user closes the browser or remains inactive for a set period, often 24 minutes.
Loading...
Related Quiz
- How do you execute a query in a MySQL database using PHP?
- In PHP, you can define a static method using the static keyword like public static function FunctionName() { ______ }.
- Which of the following are ways to include a file in PHP?
- A common use case for the $_GET superglobal in PHP is to collect the data sent in the ______.
- You can use Form Handling in PHP to send data to a database.