/
vshmidt
/
php
Обзор
Документация
Войти
/
vshmidt
/
php
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
ext/spl/tests/SplObjectStorage/observer_010.phpt
15 строк
339 B
Gina Peter Banyard
ext/spl: Deprecate SplObjectStorage::contains(), SplObjectStorage::attach(), and SplObjectStorage::detach() (#19424)
09 авг 2025, 13:36
Не верифицирован
09 авг 2025, 13:36
1687231
Код
Авторство
О чём код?
--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"