summaryrefslogtreecommitdiff
path: root/tests/lang/bug22231.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lang/bug22231.phpt')
-rw-r--r--tests/lang/bug22231.phpt42
1 files changed, 0 insertions, 42 deletions
diff --git a/tests/lang/bug22231.phpt b/tests/lang/bug22231.phpt
deleted file mode 100644
index b6842c7cf6..0000000000
--- a/tests/lang/bug22231.phpt
+++ /dev/null
@@ -1,42 +0,0 @@
---TEST--
-Bug #22231 (segfault when returning a global variable by reference)
---INI--
-error_reporting=4095
---FILE--
-<?php
-class foo {
- public $fubar = 'fubar';
-}
-
-function &foo(){
- $GLOBALS['foo'] = &new foo();
- return $GLOBALS['foo'];
-}
-$bar = &foo();
-var_dump($bar);
-var_dump($bar->fubar);
-unset($bar);
-$bar = &foo();
-var_dump($bar->fubar);
-
-$foo = &foo();
-var_dump($foo);
-var_dump($foo->fubar);
-unset($foo);
-$foo = &foo();
-var_dump($foo->fubar);
-?>
---EXPECTF--
-Strict Standards: Assigning the return value of new by reference is deprecated in %s on line %d
-object(foo)#%d (1) {
- ["fubar"]=>
- string(5) "fubar"
-}
-string(5) "fubar"
-string(5) "fubar"
-object(foo)#%d (1) {
- ["fubar"]=>
- string(5) "fubar"
-}
-string(5) "fubar"
-string(5) "fubar"