PHP 8.5.0 Alpha 1 available for testing

Voting

: zero plus two?
(Example: nine)

The Note You're Voting On

parsa dot mhn at outlook dot com
9 years ago
First of all you should execute this code :
<?php
session_start
();
$_SESSION["A"] = "Some Value";
?>

then you should execute this one :

<?php
start_session
();
$_SESSION["A"] = "Some New Value"; // set new value

session_reset(); // old session value restored
echo $_SESSION["A"];

//Output: Some Value
?>

That is because session_reset() is rolling back changes to the last saved session data, which is their values right after the session_start().

<< Back to user notes page

To Top