1--TEST-- 2Test session_unregister() function : variation 3--SKIPIF-- 4<?php include('skipif.inc'); ?> 5--FILE-- 6<?php 7 8ob_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 16echo "*** Testing session_is_registered() : variation ***\n"; 17 18var_dump(session_is_registered("foo")); 19var_dump(session_start()); 20var_dump(session_is_registered("foo")); 21var_dump($_SESSION); 22$blah = "Hello World!"; 23var_dump(session_is_registered("foo")); 24$_SESSION["foo"] = &$blah; 25var_dump($_SESSION); 26var_dump(session_is_registered("foo")); 27var_dump(session_unregister("foo")); 28var_dump(session_is_registered("foo")); 29var_dump($_SESSION); 30var_dump(session_destroy()); 31var_dump(session_is_registered("foo")); 32var_dump($_SESSION); 33 34echo "Done"; 35ob_end_flush(); 36?> 37--EXPECTF-- 38*** Testing session_is_registered() : variation *** 39 40Deprecated: Function session_is_registered() is deprecated in %s on line %d 41bool(false) 42bool(true) 43 44Deprecated: Function session_is_registered() is deprecated in %s on line %d 45bool(false) 46array(0) { 47} 48 49Deprecated: Function session_is_registered() is deprecated in %s on line %d 50bool(false) 51array(1) { 52 ["foo"]=> 53 &string(12) "Hello World!" 54} 55 56Deprecated: Function session_is_registered() is deprecated in %s on line %d 57bool(true) 58 59Deprecated: Function session_unregister() is deprecated in %s on line %d 60bool(true) 61 62Deprecated: Function session_is_registered() is deprecated in %s on line %d 63bool(false) 64array(0) { 65} 66bool(true) 67 68Deprecated: Function session_is_registered() is deprecated in %s on line %d 69bool(false) 70array(0) { 71} 72Done 73