mirror of
https://github.com/php/php-src.git
synced 2024-09-23 10:57:26 +00:00
15 lines
336 B
PHP
15 lines
336 B
PHP
--TEST--
|
|
SPL: SplObjectStorage null coalescing operator memory leak
|
|
--FILE--
|
|
<?php
|
|
// In 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"
|