blob: 41c79c3e512b70fd5015635be07fac5ad87d6065 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
--TEST--
Test session_encode() function : Numeric key raise error. bug65359
--SKIPIF--
<?php include('skipif.inc'); ?>
--FILE--
<?php
ob_start();
ini_set('session.serialize_handler', 'php_serialize');
var_dump(session_start());
$_SESSION[-3] = 'foo';
$_SESSION[3] = 'bar';
$_SESSION['var'] = 123;
var_dump(session_encode());
session_write_close();
// Should finish without errors
echo 'Done'.PHP_EOL;
?>
--EXPECTF--
bool(true)
string(51) "a:3:{i:-3;s:3:"foo";i:3;s:3:"bar";s:3:"var";i:123;}"
Done
|