]> granicus.if.org Git - php/commitdiff
test for bug #24908
authorfoobar <sniper@php.net>
Sat, 29 Nov 2003 07:54:19 +0000 (07:54 +0000)
committerfoobar <sniper@php.net>
Sat, 29 Nov 2003 07:54:19 +0000 (07:54 +0000)
tests/lang/bug24908.phpt [new file with mode: 0755]

diff --git a/tests/lang/bug24908.phpt b/tests/lang/bug24908.phpt
new file mode 100755 (executable)
index 0000000..30056ab
--- /dev/null
@@ -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