3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Test { function __wakeup() { print "wakeup\n"; } } session_start(); session_decode('core|a:1:{s:23:"_session_validator_data";a:4:{s:11:"remote_addr";s:9:"127.0.0.1";s:8:"http_via";s:0:"";s:20:"http_x_forwarded_for";s:0:"";s:15:"http_user_agent";s:5:"}}test|a:2:{i:0;O:4:"Test":0:{}i:1;a:1:{i:0;s:0:"";}}'); var_dump($_SESSION);
based on Y2ejm
Output for 5.4.45, 5.5.29 - 5.5.35, 5.6.13 - 7.2.0
Warning: session_decode(): Failed to decode session object. Session has been destroyed in /in/uRteX on line 10 array(0) { }
Output for 5.3.20 - 5.4.44, 5.5.24 - 5.5.28, 5.6.8 - 5.6.12
wakeup array(2) { ["core"]=> NULL ["t"]=> array(2) { [0]=> object(Test)#1 (0) { } [1]=> array(1) { [0]=> string(0) "" } } }