diff options
author | Xinchen Hui <laruence@gmail.com> | 2016-11-21 11:46:03 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@gmail.com> | 2016-11-21 11:46:03 +0800 |
commit | 270f9a0216ebc7c02b5fa7f5fee3d59015a6dfff (patch) | |
tree | 25b188ff20ebf5b72b64e0987adedeacefcbb328 /ext/spl | |
parent | f284479734f1612c06a9d8987453a533ddea4a6e (diff) | |
parent | a39d2f8ea1e41a7e8b81c8b14c5faa9fd8bab179 (diff) | |
download | php-git-270f9a0216ebc7c02b5fa7f5fee3d59015a6dfff.tar.gz |
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
Update NEWS
Fix memory leak(null coalescing operator with Spl hash)
Diffstat (limited to 'ext/spl')
-rw-r--r-- | ext/spl/tests/observer_010.phpt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/spl/tests/observer_010.phpt b/ext/spl/tests/observer_010.phpt new file mode 100644 index 0000000000..5cedff8c7c --- /dev/null +++ b/ext/spl/tests/observer_010.phpt @@ -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" |