File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / session / tests / session_id_error4.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_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, v5_3_10, HEAD
php

    1: --TEST--
    2: Test session_id() function : error functionality
    3: --SKIPIF--
    4: <?php include('skipif.inc'); ?>
    5: --INI--
    6: session.hash_function=0
    7: session.hash_bits_per_character=4
    8: --FILE--
    9: <?php
   10: 
   11: ob_start();
   12: 
   13: /* 
   14:  * Prototype : string session_id([string $id])
   15:  * Description : Get and/or set the current session id
   16:  * Source code : ext/session/session.c 
   17:  */
   18: 
   19: echo "*** Testing session_id() : error functionality ***\n";
   20: 
   21: var_dump(ini_set("session.hash_function", -1));
   22: var_dump(session_id());
   23: var_dump(session_start());
   24: var_dump(session_id());
   25: var_dump(session_destroy());
   26: 
   27: echo "Done";
   28: ob_end_flush();
   29: ?>
   30: --EXPECTF--
   31: *** Testing session_id() : error functionality ***
   32: string(1) "0"
   33: string(0) ""
   34: bool(true)
   35: string(40) "%s"
   36: bool(true)
   37: Done

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