xref: /PHP-8.1/ext/session/tests/bug53141.phpt (revision b5a14e6c)
1--TEST--
2Bug #53141 (autoload misbehaves if called from closing session)
3--EXTENSIONS--
4session
5--SKIPIF--
6<?php include('skipif.inc'); ?>
7--FILE--
8<?php
9spl_autoload_register(function ($class) {
10    var_dump("Loading $class");
11    eval('class Bar {}');
12});
13
14class Foo
15{
16    function __sleep()
17    {
18        new Bar;
19        return array();
20    }
21}
22
23session_start();
24$_SESSION['foo'] = new Foo;
25
26?>
27--EXPECT--
28string(11) "Loading Bar"
29