Annotation of embedaddon/php/ext/session/tests/session_is_registered_variation2.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test session_unregister() function : variation
3: --SKIPIF--
4: <?php include('skipif.inc'); ?>
5: --FILE--
6: <?php
7:
8: ob_start();
9:
10: /*
11: * Prototype : bool session_is_registered(string $name)
12: * Description : Find out whether a global variable is registered in a session
13: * Source code : ext/session/session.c
14: */
15:
16: echo "*** Testing session_is_registered() : variation ***\n";
17:
18: var_dump(session_is_registered("foo"));
19: var_dump(session_start());
20: var_dump(session_is_registered("foo"));
21: var_dump($_SESSION);
22: $_SESSION["foo"] = "Hello World!";
23: var_dump(session_is_registered("foo"));
24: var_dump($_SESSION);
25: var_dump(session_is_registered("foo"));
26: var_dump(session_unregister("foo"));
27: var_dump(session_is_registered("foo"));
28: var_dump($_SESSION);
29: var_dump(session_destroy());
30: var_dump(session_is_registered("foo"));
31: var_dump($_SESSION);
32: var_dump(session_is_registered("foo"));
33:
34: echo "Done";
35: ob_end_flush();
36: ?>
37: --EXPECTF--
38: *** Testing session_is_registered() : variation ***
39:
40: Deprecated: Function session_is_registered() is deprecated in %s on line %d
41: bool(false)
42: bool(true)
43:
44: Deprecated: Function session_is_registered() is deprecated in %s on line %d
45: bool(false)
46: array(0) {
47: }
48:
49: Deprecated: Function session_is_registered() is deprecated in %s on line %d
50: bool(true)
51: array(1) {
52: ["foo"]=>
53: string(12) "Hello World!"
54: }
55:
56: Deprecated: Function session_is_registered() is deprecated in %s on line %d
57: bool(true)
58:
59: Deprecated: Function session_unregister() is deprecated in %s on line %d
60: bool(true)
61:
62: Deprecated: Function session_is_registered() is deprecated in %s on line %d
63: bool(false)
64: array(0) {
65: }
66: bool(true)
67:
68: Deprecated: Function session_is_registered() is deprecated in %s on line %d
69: bool(false)
70: array(0) {
71: }
72:
73: Deprecated: Function session_is_registered() is deprecated in %s on line %d
74: bool(false)
75: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>