diff options
Diffstat (limited to 'ext/session/tests/005.phpt')
-rw-r--r-- | ext/session/tests/005.phpt | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/ext/session/tests/005.phpt b/ext/session/tests/005.phpt index 124f0a831e..a970e6b71d 100644 --- a/ext/session/tests/005.phpt +++ b/ext/session/tests/005.phpt @@ -5,7 +5,6 @@ custom save handler, multiple session_start()s, complex data structure test. --INI-- session.use_cookies=0 session.cache_limiter= -register_globals=1 session.name=PHPSESSID session.serialize_handler=php --FILE-- @@ -58,37 +57,41 @@ session_set_save_handler(array($hnd, "open"), array($hnd, "close"), array($hnd, session_id("abtest"); session_start(); -$baz->method(); -$arr[3]->method(); +session_decode($hnd->data); -var_dump($baz); -var_dump($arr); +$_SESSION["baz"]->method(); +$_SESSION["arr"][3]->method(); + +var_dump($_SESSION["baz"]); +var_dump($_SESSION["arr"]); session_write_close(); session_set_save_handler(array($hnd, "open"), array($hnd, "close"), array($hnd, "read"), array($hnd, "write"), array($hnd, "destroy"), array($hnd, "gc")); session_start(); -$baz->method(); -$arr[3]->method(); +$_SESSION["baz"]->method(); +$_SESSION["arr"][3]->method(); -$c = 123; -session_register("c"); -var_dump($baz); var_dump($arr); var_dump($c); +$_SESSION["c"] = 123; +var_dump($_SESSION["baz"]); +var_dump($_SESSION["arr"]); +var_dump($_SESSION["c"]); session_write_close(); session_set_save_handler(array($hnd, "open"), array($hnd, "close"), array($hnd, "read"), array($hnd, "write"), array($hnd, "destroy"), array($hnd, "gc")); session_start(); -var_dump($baz); var_dump($arr); var_dump($c); +var_dump($_SESSION["baz"]); +var_dump($_SESSION["arr"]); +var_dump($_SESSION["c"]); session_destroy(); ?> --EXPECTF-- -Warning: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0 OPEN: PHPSESSID READ: abtest -object(foo)#2 (2) { +object(foo)#4 (2) { ["bar"]=> string(2) "ok" ["yes"]=> @@ -96,7 +99,7 @@ object(foo)#2 (2) { } array(1) { [3]=> - object(foo)#3 (2) { + object(foo)#2 (2) { ["bar"]=> string(2) "ok" ["yes"]=> @@ -107,9 +110,7 @@ WRITE: abtest, baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:2;}arr|a:1:{i:3;O CLOSE OPEN: PHPSESSID READ: abtest - -Deprecated: Function session_register() is deprecated in %s on line %d -object(foo)#4 (2) { +object(foo)#2 (2) { ["bar"]=> string(2) "ok" ["yes"]=> @@ -117,7 +118,7 @@ object(foo)#4 (2) { } array(1) { [3]=> - object(foo)#2 (2) { + object(foo)#4 (2) { ["bar"]=> string(2) "ok" ["yes"]=> @@ -129,7 +130,7 @@ WRITE: abtest, baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:3;}arr|a:1:{i:3;O CLOSE OPEN: PHPSESSID READ: abtest -object(foo)#3 (2) { +object(foo)#4 (2) { ["bar"]=> string(2) "ok" ["yes"]=> @@ -137,7 +138,7 @@ object(foo)#3 (2) { } array(1) { [3]=> - object(foo)#4 (2) { + object(foo)#2 (2) { ["bar"]=> string(2) "ok" ["yes"]=> |