File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / session / tests / session_register_variation4.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, 4 months ago) by misho
Branches: php, MAIN
CVS tags: v5_3_10, HEAD
php

    1: --TEST--
    2: Test session_register() function : variation
    3: --SKIPIF--
    4: <?php include('skipif.inc'); ?>
    5: --FILE--
    6: <?php
    7: 
    8: ob_start();
    9: 
   10: /* 
   11:  * Prototype : bool session_register(mixed $name [,mixed $...])
   12:  * Description : Register one or more global variables with the current session
   13:  * Source code : ext/session/session.c 
   14:  */
   15: 
   16: echo "*** Testing session_register() : variation ***\n";
   17: 
   18: $blah = "Hello World!";
   19: $foo = &$blah;
   20: var_dump(session_start());
   21: var_dump($_SESSION);
   22: var_dump(session_register("foo"));
   23: var_dump($_SESSION);
   24: var_dump(session_destroy());
   25: var_dump($_SESSION);
   26: 
   27: echo "Done";
   28: ob_end_flush();
   29: ?>
   30: --EXPECTF--
   31: *** Testing session_register() : variation ***
   32: bool(true)
   33: array(0) {
   34: }
   35: 
   36: Deprecated: Function session_register() is deprecated in %s on line %d
   37: bool(true)
   38: array(1) {
   39:   ["foo"]=>
   40:   NULL
   41: }
   42: bool(true)
   43: array(1) {
   44:   ["foo"]=>
   45:   NULL
   46: }
   47: Done

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