~ubuntu-branches/ubuntu/quantal/php5/quantal

« back to all changes in this revision

Viewing changes to ext/session/tests/session_encode_variation4.phpt

  • Committer: Bazaar Package Importer
  • Author(s): Sean Finney
  • Date: 2009-07-01 09:12:10 UTC
  • mto: (0.9.1) (1.1.17 upstream)
  • mto: This revision was merged to the branch mainline in revision 58.
  • Revision ID: james.westby@ubuntu.com-20090701091210-go0h6506p62on17r
Tags: upstream-5.3.0
ImportĀ upstreamĀ versionĀ 5.3.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--TEST--
 
2
Test session_encode() function : variation
 
3
--SKIPIF--
 
4
<?php include('skipif.inc'); ?>
 
5
--FILE--
 
6
<?php
 
7
 
 
8
ob_start();
 
9
 
 
10
/* 
 
11
 * Prototype : string session_encode(void)
 
12
 * Description : Encodes the current session data as a string
 
13
 * Source code : ext/session/session.c 
 
14
 */
 
15
 
 
16
echo "*** Testing session_encode() : variation ***\n";
 
17
 
 
18
var_dump(session_start());
 
19
 
 
20
$array = array(1,2,3);
 
21
$_SESSION["foo"] = &$array;
 
22
$_SESSION["guff"] = &$array;
 
23
$_SESSION["blah"] = &$array;
 
24
var_dump(session_encode());
 
25
var_dump(session_destroy());
 
26
 
 
27
echo "Done";
 
28
ob_end_flush();
 
29
?>
 
30
--EXPECTF--
 
31
*** Testing session_encode() : variation ***
 
32
bool(true)
 
33
string(52) "foo|a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}guff|R:1;blah|R:1;"
 
34
bool(true)
 
35
Done