summaryrefslogtreecommitdiff
path: root/tests/lang/bug24908.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lang/bug24908.phpt')
-rw-r--r--tests/lang/bug24908.phpt18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/lang/bug24908.phpt b/tests/lang/bug24908.phpt
new file mode 100644
index 0000000..30056ab
--- /dev/null
+++ b/tests/lang/bug24908.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Bug #24908 (super-globals can not be used in __destruct())
+--INI--
+variables_order=GPS
+--FILE--
+<?php
+class test {
+ function __construct() {
+ if (count($_SERVER)) echo "O";
+ }
+ function __destruct() {
+ if (count($_SERVER)) echo "K\n";
+ }
+}
+$test = new test();
+?>
+--EXPECT--
+OK