|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-12-12 09:53 UTC] iliaa@php.net
[2002-12-29 10:28 UTC] JeanFrederic at Loiseau dot org
[2003-01-02 18:47 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 21:00:01 2025 UTC |
function get_session_decode($sessStr) { if ($sessStr) { session_decode($sessStr); unset($sessStr); $vars = get_defined_vars(); return $vars; } //if } //func The following function should return an array of session variables: function get_session_decode($sessStr) { if ($sessStr) { session_decode($sessStr); unset($sessStr); $vars = get_defined_vars(); return $vars; } //if } //func print_r(get_session_decode('TEST|s:7:"testing";')); however session_decode always crashes when you pass it a valid session string. It does not crash if you pass it an invalid session string or an empty/false string. I tried using the function by it self, but it still crashes. No sessions where created at the time (which SHOULD NOT be needed). If you call session_start() first, it does not crash, but does not set any variables.