File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / session / tests / session_unregister_variation3.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:48:01 2012 UTC (12 years, 5 months ago) by misho
Branches: php, MAIN
CVS tags: v5_3_10, HEAD
php

    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_unregister(string $name)
   12:  * Description : Unregister a global variable from the current session
   13:  * Source code : ext/session/session.c 
   14:  */
   15: 
   16: echo "*** Testing session_unregister() : variation ***\n";
   17: 
   18: var_dump(session_start());
   19: var_dump($_SESSION);
   20: $blah = "Hello World!";
   21: $_SESSION["foo"] = &$blah;
   22: var_dump($_SESSION);
   23: var_dump(session_unregister("foo"));
   24: var_dump($_SESSION);
   25: var_dump(session_destroy());
   26: var_dump($_SESSION);
   27: 
   28: echo "Done";
   29: ob_end_flush();
   30: ?>
   31: --EXPECTF--
   32: *** Testing session_unregister() : variation ***
   33: bool(true)
   34: array(0) {
   35: }
   36: array(1) {
   37:   ["foo"]=>
   38:   &string(12) "Hello World!"
   39: }
   40: 
   41: Deprecated: Function session_unregister() is deprecated in %s on line %d
   42: bool(true)
   43: array(0) {
   44: }
   45: bool(true)
   46: array(0) {
   47: }
   48: Done

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>