summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Lerdorf <rasmus@php.net>2012-01-08 18:22:50 +0000
committerRasmus Lerdorf <rasmus@php.net>2012-01-08 18:22:50 +0000
commit2651a1fc39813533e8aa6e6afe163d8126c685ca (patch)
tree3bd210b1d7e3fd892225a31db98ff0d96914f916
parent34bcd34b8cc4b23ca4a0ab323f48139589805b21 (diff)
downloadphp-git-2651a1fc39813533e8aa6e6afe163d8126c685ca.tar.gz
Make sure gc is enabled
-rw-r--r--ext/spl/tests/bug53071.phpt53
1 files changed, 27 insertions, 26 deletions
diff --git a/ext/spl/tests/bug53071.phpt b/ext/spl/tests/bug53071.phpt
index b0ea3aad84..c2c2605e2e 100644
--- a/ext/spl/tests/bug53071.phpt
+++ b/ext/spl/tests/bug53071.phpt
@@ -1,26 +1,27 @@
---TEST--
-Bug #53071 (Usage of SPLObjectStorage defeats gc_collect_cycles)
---FILE--
-<?php
-class myClass
-{
- public $member;
-}
-function LimitedScope()
-{
- $myA = new myClass();
- $myB = new SplObjectStorage();
- $myC = new myClass();
- $myC->member = $myA; // myC has a referece to myA
- $myB->Attach($myC); // myB attaches myC
- $myA->member = $myB; // myA has myB, comleting the cycle
-}
-LimitedScope();
-var_dump(gc_collect_cycles());
-
-echo "Done.\n";
-
-?>
---EXPECTF--
-int(5)
-Done.
+--TEST--
+Bug #53071 (Usage of SPLObjectStorage defeats gc_collect_cycles)
+--FILE--
+<?php
+gc_enable();
+class myClass
+{
+ public $member;
+}
+function LimitedScope()
+{
+ $myA = new myClass();
+ $myB = new SplObjectStorage();
+ $myC = new myClass();
+ $myC->member = $myA; // myC has a referece to myA
+ $myB->Attach($myC); // myB attaches myC
+ $myA->member = $myB; // myA has myB, comleting the cycle
+}
+LimitedScope();
+var_dump(gc_collect_cycles());
+
+echo "Done.\n";
+
+?>
+--EXPECTF--
+int(5)
+Done.