We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8808c5 commit fe87c0eCopy full SHA for fe87c0e
tests/bson/bug2505.phpt
@@ -4,6 +4,8 @@ PHPC-2505: gc_collect_cycles() may interfere with using foreach to iterate objec
4
<?php
5
require_once __DIR__ . "/../utils/basic.inc";
6
7
+gc_disable();
8
+
9
$tests = [
10
[ 'binary' => new MongoDB\BSON\Binary('foo', MongoDB\BSON\Binary::TYPE_GENERIC) ],
11
[ 'dbpointer' => createDBPointer() ],
@@ -32,6 +34,9 @@ foreach ($tests as $test) {
32
34
}
33
35
$buf1 = ob_end_clean();
36
37
+gc_enable();
38
+gc_collect_cycles();
39
40
ob_start();
41
foreach ($tests as $test) {
42
echo key($test), "\n";
0 commit comments