xref: /PHP-8.1/ext/session/tests/012.phpt (revision b5a14e6c)
1--TEST--
2registering $_SESSION should not segfault
3--EXTENSIONS--
4session
5--SKIPIF--
6<?php include('skipif.inc'); ?>
7--INI--
8session.use_cookies=0
9session.use_strict_mode=0
10session.cache_limiter=
11session.serialize_handler=php
12session.save_handler=files
13--FILE--
14<?php
15error_reporting(E_ALL);
16
17### Absurd example, value of $_SESSION does not matter
18
19session_id("test012");
20session_start();
21$_SESSION["_SESSION"] = Array();
22$_SESSION = "kk";
23
24session_write_close();
25
26### Restart to test for $_SESSION brokenness
27
28session_start();
29$_SESSION = "kk";
30session_destroy();
31
32print "I live\n";
33?>
34--EXPECT--
35I live
36