I’m moving a legacy system which I didn’t create from one server (php 5.2) to a newer one (php 5.3) and a lot of the system uses session_unregister. I appreciate this is now deprecated in 5.3 so should I go ahead and replace all cases with unset($_SESSION[‘myVar’]) or will this cause something to break?
Even better, is there an alternative that achieves the same function that I require, if unset() isn’t the correct one
You can unset specific session vars using
unset($_SESSION['yourvar']);, but mind this part from the manual:(from: http://php.net/manual/en/function.session-unset.php )