1
0
mirror of https://github.com/php/php-src.git synced 2026-04-01 05:02:27 +02:00

Merge branch 'PHP-7.1'

* PHP-7.1:
  Update NEWS
  Fix memory leak(null coalescing operator with Spl hash)
This commit is contained in:
Xinchen Hui
2016-11-21 11:46:13 +08:00
2 changed files with 17 additions and 0 deletions

View File

@@ -0,0 +1,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);
--EXPECTF--
NULL
string(3) "foo"