xref: /PHP-8.0/tests/lang/bug24908.phpt (revision f8d79582)
1--TEST--
2Bug #24908 (super-globals can not be used in __destruct())
3--INI--
4variables_order=GPS
5--FILE--
6<?php
7class test {
8    function __construct() {
9        if (count($_SERVER)) echo "O";
10    }
11    function __destruct() {
12        if (count($_SERVER)) echo "K\n";
13    }
14}
15$test = new test();
16?>
17--EXPECT--
18OK
19