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