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