summaryrefslogtreecommitdiff
path: root/ext/spl/tests/observer_010.phpt
blob: 5cb9b799eeafd5f566466deb406449bc6e283ac9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--TEST--
SPL: SplObjectStorage null coalescing operator memory leak
--FILE--
<?php
// In maintainer zts mode, this should no longer
// detect memory leaks for the objects
$a = new stdClass();
$b = new stdClass();
$map = new SplObjectStorage();
$map[$a] = 'foo';
var_dump($map[$b] ?? null);
var_dump($map[$a] ?? null);
--EXPECT--
NULL
string(3) "foo"