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