diff options
author | Ant Phillips <ant@php.net> | 2008-12-02 13:32:53 +0000 |
---|---|---|
committer | Ant Phillips <ant@php.net> | 2008-12-02 13:32:53 +0000 |
commit | 2b1a411806c7b0e5692d5472e4f1da4b002b330e (patch) | |
tree | 1ca6b2cdf51cf89b552049a034f201cc48299083 /ext/standard/tests/array/bug44182.phpt | |
parent | ec1ee12281edfe6bcd148ade3711fbf3996e3738 (diff) | |
download | php-git-2b1a411806c7b0e5692d5472e4f1da4b002b330e.tar.gz |
Array tests: checked on PHP 5.2.6, 5.3 and 6.0 (Windows, Linux and Linux 64 bit).
Diffstat (limited to 'ext/standard/tests/array/bug44182.phpt')
-rw-r--r-- | ext/standard/tests/array/bug44182.phpt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ext/standard/tests/array/bug44182.phpt b/ext/standard/tests/array/bug44182.phpt new file mode 100644 index 0000000000..47f3caafb8 --- /dev/null +++ b/ext/standard/tests/array/bug44182.phpt @@ -0,0 +1,19 @@ +--TEST-- +Bug #44182 (extract EXTR_REFS can fail to split copy-on-write references) +--FILE-- +<?php +$a = array('foo' => 'original.foo'); + +$nonref = $a['foo']; +$ref = &$a; + +extract($a, EXTR_REFS); +$a['foo'] = 'changed.foo'; + +var_dump($nonref); +echo "Done\n"; +?> +--EXPECTF-- +string(%d) "original.foo" +Done + |