From:             
Operating system: 
PHP version:      5.3.6
Package:          Session related
Bug Type:         Feature/Change Request
Bug description:extend the usage of session_encode/session_decode

Description:
------------
I always wondered about the rationale about the session_encode/decode in
it's 

current form, but Chris Shiflett's blogpost made me to open this
bugreport:

http://shiflett.org/blog/2011/mar/php-session-debugging



I would propose two changes:

- add a new optional array argument for session_encode, if it is passed,
then 

encode that instead of the $_SESSION array.

- add a new optional boolean argument for session_decode, if that sets to
true 

(default is false), then the decoded session array is returned instead of 

inserted to $_SESSION



obviously the documentation about the return variable for session_decode
should 

also be updated to reflect this change.



this should be backward compatible change, but it would allow us to 

encode/decode an arbitary serialized session without the need to save and
reload 

the contents of the current $_SESSION array.


-- 
Edit bug report at http://bugs.php.net/bug.php?id=54383&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=54383&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=54383&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=54383&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=54383&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=54383&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=54383&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=54383&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=54383&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=54383&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=54383&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=54383&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=54383&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=54383&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=54383&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=54383&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=54383&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=54383&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=54383&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=54383&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=54383&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=54383&r=mysqlcfg

Reply via email to