get reference variable in php using session_decode result
188701-Nov-2014
I noticed that the PHP session_decode() function has an object type for PHP reference variables signified by 'R'. However, I can't seem to find out how to get session_decode() to output this object type. If I assign a reference variable to $_SESSION, and then call session_decode(), the reference variable is represented by session_decode() as having the same object type as the variable it references and not 'R'. What is the use case for the session_decode object type of 'R'?
Anonymous User
01-Nov-2014For session_encode to encode a variable as a reference, the referenced variable needs to be in session too. If it's not in session, then it will encode it as the original type.
Outputs: