mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_splobjectstoragecontains_splobjectstorageattach_and_splobjectstoragedetach
16 lines
339 B
PHP
16 lines
339 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"
|