summaryrefslogtreecommitdiff
path: root/ext/session/tests/bug53141.phpt
blob: e240fec8a734dd54c45a233cfe3b0a97958ef2df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--TEST--
Bug #53141 (autoload misbehaves if called from closing session)
--SKIPIF--
<?php include('skipif.inc'); ?>
--FILE--
<?php
spl_autoload_register(function ($class) {
    var_dump("Loading $class");
    eval('class Bar {}');
});

class Foo
{
    function __sleep()
    {
        new Bar;
        return array();
    }
}

session_start();
$_SESSION['foo'] = new Foo;

?>
--EXPECT--
string(11) "Loading Bar"